lua-users home
lua-l archive

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


On Friday 31 March 2006 7:43 am, Mildred wrote:
> I just have a question about HelperThreads ... Can we use it to make a
> multithread lua application ? Can we use it to have multiple lua
> threads (that can share lua variables) at the same time or not ?

no, for that you can use LuaThreads.

HelperThreads has much lower performance impact precisely because of the 
constraint that a background task MUST NOT touch or access the Lua state in 
any way.

i have some (currently vague) plans to do a Rings-like library with HTT, 
resulting in something very similar to LuaTasks, but that doesn't let you 
share lua variables between states.

i'd love to see a solution for this... but until there's a per-object locking 
in the Lua core, LuaThreads will be the only way.

-- 
Javier

Attachment: pgpDeD7IaYrwg.pgp
Description: PGP signature