mirror of
https://github.com/mlua-rs/mlua
synced 2026-06-08 16:05:43 +00:00
Don't keep poll function in environment globals when polling async functions.
This is redundant after deprecating scoped async. Closes #281
This commit is contained in:
+2
-3
@@ -2845,11 +2845,10 @@ impl Lua {
|
||||
LightUserData(&ASYNC_POLL_PENDING as *const u8 as *mut c_void)
|
||||
})?;
|
||||
|
||||
// We set `poll` variable in the env table to be able to destroy upvalues
|
||||
self.load(
|
||||
r#"
|
||||
poll = get_poll(...)
|
||||
local poll, pending, yield, unpack = poll, pending, yield, unpack
|
||||
local poll = get_poll(...)
|
||||
local pending, yield, unpack = pending, yield, unpack
|
||||
while true do
|
||||
local ready, res, nres = poll()
|
||||
if ready then
|
||||
|
||||
Reference in New Issue
Block a user