lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



It is true that some addon modules may have issues when used in multithreaded scenarios. I believe this is mostly just, since this usage hasn't been so wide-spread in the past, and will be gradually fixed by the module authors now that multicore is becoming a norm (at least in the x86 world).

The way Lua Lanes helps make modules multithreaded capable is it protects calls to 'require' so that only one happens at a time. This allows the module author to do things s.a. "did we get this initialized already" checks without resorting to critical sections.

More information at the Lanes manual:

http://kotisivu.dnainternet.net/askok/bin/lanes/

-asko


gary ng kirjoitti 9.7.2007 kello 6:02:

I see that lanes is in one way similar to rings in
that each thread would have a seperate lua_State(where
I assume it can also load modules of its own), though
it can run in parallel.

My experience with rings however has one critical
issue(which is not actually related to rings but lua
and certain C library like the mysql bindings) in that
if I load the mysql library inside a ring, there is no
way to properly clean up the memory used inside that
ring(not necessary because of lua but more likely
mysql).

At the moment, my work around for it is to load these
offending C libraries modules inside the main
thread(or the hosting environment of rings) even it is
not used. Then I can start and stop rings multiple
times without seeing the RAM usage going up.

--- Asko Kauppi <askok@dnainternet.net> wrote:


There is no project home page, although LuaForge
seems to have come
up with the link.  I will remove it, thanks for
informing.

Important pages are the Files tab
(http://luaforge.net/frs/?
group_id=265) and the manual page, also included in
the tgz (http://

luaforge.net/docman/index.php?group_id=265&selected_doc_group_id=292)





______________________________________________________________________ ______________ Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.
http://farechase.yahoo.com/