[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: A question about "yieldables"
- From: Sean Conner <sean@...>
- Date: Mon, 23 Feb 2015 16:21:54 -0500
It was thus said that the Great Soni L. once stated:
> Lua 5.2 added the ability to yield thru C functions, but most functions
> aren't yieldable (e.g. string.gsub, load, table.sort). Does the manual
> require that those functions be non-yieldable? or could a conforming
> implementation have them be yieldable? (Also why are they not yieldable
> in the reference implementation?)
You could, in theory, rewrite the problematic functions in Lua itself,
calling coroutine.yield() as required.
-spc