|
On 06/24/2014 11:49 PM, Pierre-Yves Gérardy wrote:
It works around an "yield across C boundary" issue when using the MoonScript loader with OpenResty. The first resumes a coroutine at parse time, and the latter runs request handlers in coroutines. Requiring a MoonScript file from a handler breaks because of this, since `require()` is a C function.
You can patch "require" in Lua 5.2 to have a continuation function. If you wan't to I'll try to extract it from my sources. -- Thomas