lua-users home
lua-l archive

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


Hi,

Roberto Ierusalimschy wrote:
> The problem is an overflow of the C stack. Lua has a counter to detect
> that, but the use of coroutines deceived the counter. Actually this is a
> bug. That counter should be global (one for all trheads) instead of one
> per thread (after all, the C stack is global).

I tend to agree. But this won't integrate well with luathreads where
of course every native thread has its own C stack. It gets even more
complicated when native threads are mixed with coroutines.

[Sorry, I can't see a simple solution other than an #ifdef mess.]

I'm not using luathreads (because of high locking overhead and
'mutex hell'), but others may want to. I don't know how popular
luathreads is (most of us seem to prefer the alternative
one-universe-per-native-thread approach or non-preemptive solutions).

Bye,
     Mike