[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lua_yieldk/lua_resume not removing yielded values
- From: Jerome Vuarand <jerome.vuarand@...>
- Date: Sat, 16 Feb 2013 00:57:17 +0000
2013/2/15 Patrick Donnelly <batrick@batbytes.com>:
> It would seem to me that this is inconsistent with the rest of the
> API. After all, you don't have to clear the stack of other items
> before calling lua_call. It would seem removing extraneous items on
> the stack on resume is the sensible and expected behavior.
If you want to be consistent with lua_call, you wouldn't remove the
values but let them there, still accessible after lua_resume returns,
but not accessible to the coroutine itself (in the continuation
function). Or maybe that's what you meant (ie. removing them from the
grasp of the continuation).