lua-users home
lua-l archive

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


On Wed, Oct 11, 2006 at 10:03:55PM -0500, Rici Lake wrote:
> As for sethook, if there were any doubt, wouldn't it be easier to 
> simply make the hook fields in lua_State atomic_t? Or is that not 
> guaranteed to exist?

Isn't that a Linux kernel API?

> My attempts to use threaded Lua weren't all that successful, although I 
> haven't tried with 5.1. In particular, I found the fact that all Lua 
> threads would freeze during a garbage collection to be problematic; 
> this would be less serious with 5.1, but still an issue. And, as you 
> say, the overhead of constantly locking and unlocking. Since it's not 
> particularly costly to maintain multiple unrelated Lua states, I've 
> gone that route, although it makes data sharing a bit awkward.

Multiple Lua universes (assuming that's what you mean, and not just
per-thread lua_States) doesn't fit my use, unfortunately.

-- 
Glenn Maynard