lua-users home
lua-l archive

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


On 17 December 2015 at 01:25, Roberto Ierusalimschy
<roberto@inf.puc-rio.br> wrote:
>> Is it possible to yield values from a hook?
>
> No.
>
> -- Roberto
>

Would you consider adding this ability in future?

I was looking for a way to forcibly yield a coroutine (which is possible, yay!)
However if you can't yield any values, it is incompatible with schemes
like coronest[1] where "resume"s only catch their matching "yield"
(they do this by using unique values as the first value to the yield)

[1] https://github.com/saucisson/lua-coronest