Fixed bug when polling async futures (#77)
We expect first value returned via coroutine.yield() to be a special Pending type. But instead we checked second value.
This commit is contained in:
parent
584b377640
commit
c62b17a5c8
|
@ -344,7 +344,7 @@ where
|
|||
#[inline(always)]
|
||||
fn is_poll_pending(val: &MultiValue) -> bool {
|
||||
match val.iter().enumerate().last() {
|
||||
Some((1, Value::LightUserData(ud))) => {
|
||||
Some((0, Value::LightUserData(ud))) => {
|
||||
ud.0 == &ASYNC_POLL_PENDING as *const u8 as *mut c_void
|
||||
}
|
||||
_ => false,
|
||||
|
|
Loading…
Reference in New Issue