lua-users home
lua-l archive

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


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