|Subject:||Re: [Libqtlua-list] QtLua newbie.|
|Date:||Sat, 2 Feb 2013 02:11:32 +0900|
On Friday, February 01, 2013 03:21:01 PM Joonhwan Lee wrote:
The QtLua smart-pointer class relies on the GNU compiler atomic builtins to
> Question 1 : The #warning message makes me feels that using QtLua in
> multithreaded application is dangerous.
> Is it ? If not, what things should I take into account for to use it under
> multithreaded environment?
update its internal reference counter. When this is not available, smart-
pointers are not safe to handle from different threads without explicit
Previous versions of QtLua used the portable QAtomicInt class but
unfortunately it does not provide all the required operations for what is need
by the last version of QtLua.
If you want to add atomic operation support for your platform, you need to
patch src/QtLua/qtluaref.hh in a few places.
See examples/cpp/qobject and examples/cpp/value. You need to read the doc
> Question 2 : I want to use it only for my application access to my own
> QObject. Which example should I learn?
about QObject ownership.
If you use QObject properties with custom types, see examples/cpp/types
examples/cpp/userdata may be of some interest if you want to access non-
QObject c++ classes from lua.
|[Prev in Thread]||Current Thread||[Next in Thread]|