lua-users home
lua-l archive

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


On Jul 18, 2011, at 9:01 AM, James McKaskill wrote:

> The problem crops up wrt to lua coroutines. Each coroutine has a
> seperate lua_State*. The callback is hard coded with the coroutine
> that was active at the time it was created. This is an issue if that
> thread is not ready (its resumed another thread, is currently yielded,
> or has been garbage collected).

This is a great reason to use LUA_RIDX_MAINTHREAD for callbacks in Lua 5.2

e