[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Coroutine trouble
- From: Alexander Gladysh <agladysh@...>
- Date: Sun, 15 Feb 2009 22:10:54 +0300
On Sun, Feb 15, 2009 at 2:44 PM, Vyacheslav Egorov
> Just a wild guess based on a weird traceback I saw in your example and the
> data I read in issue. (Unfortunately I do not have time to analyze
> LuaAlchemy sources.)
> When you register as -> lua callback (I assume) you store not only passed
> lua function, but also a lua_State and then call stored callback in that
> But the problem arises when you register as->lua callbacks from coroutines
> because you store _that_ coroutine and then call stored callback in _that_
> coroutine's lua_State. So you are trying to resume coroutine from the
> coroutine itself.
Ah! But of course!
If I create AS3 value of callback outside the coroutine (by wrapping
it in as3.toas3() call) everything works. We would need to fix the
issue in 0.3...