lua-users home
lua-l archive

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

> > As you are already using a non-standard Lua compilation, maybe you can
> > simply change the limit LUAI_MAXCCALLS in luaconf.h to a much higher
> > value.
> What Markus describes is exactly how I implement multi threading in
> Lua 5.1, both on Windows and on an embedded system OS.  To understand
> this issue properly, is there really a mismatch in the call counter?

As far as I understand, the nCcalls still counts correctly the
difference of calls/returns in the C stack(s) that is (are) running
Lua. But if there are many threads (and stacks), the difference may be
large sometimes.

The mismatch can only occur if your C threads are being destroyed
without being properly terminated, so some of their calls may not have
a correspondent return.

-- Roberto