[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: nCcalls in the global state keeps increasing in 5.2
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 2 Aug 2011 14:13:33 -0300
> When a coroutine runs, the coroutine can call a number of C functions. some
> of these C functions may resume another coroutine. The resumed coroutine is
> using a different lua state (L), thus I cannot see why that would be a
> problem. Are you telling me that one cannot resume another coroutine from a
> Lua binding?
You can, but even if they run on different threads (L), they share the
same C stack. So, if you keep nesting the calls, you risk overflowing
the C stack, so Lua throws that error.
-- Roberto