[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Yieldable require
- From: Pierre-Yves Gérardy <pygy79@...>
- Date: Thu, 18 May 2017 18:47:26 +0200
For Lua 5.1 and 5.2, https://github.com/pygy/require.lua does the same
in plain Lua, no patch required.
require = require'require'.require
and you're ready to go
I haven't kept up with Lua 5.3 though, and I don't know if the
`require()` differs from v5.2.
if it doesn't replace the line above with (in Lua 5.3)
require = require('require').require52
On Mon, May 15, 2017 at 4:13 PM, Daurnimator <firstname.lastname@example.org> wrote:
> I encountered a situation where an asynchronous 'require' was desired;
> here is a patch to allow require to yield: