You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When debugging tuple Merge with mw we found something which hints at a potential bug in tuple Merge. The test case was as follows:
let a = stream::once(async{()});let b = stream::once(pending());let c = (a, b).merge();whileletSome(_) = c.next().await{dbg!(item);}println!("done");
"done" should never be able to print in this case. When doing a cargo run it never triggered, but when running it through the debugger we could see it trigger. This may hint at a race condition!
The text was updated successfully, but these errors were encountered:
Okay the issue was we were using futures::pending! instead of futures::future::pending. It apparently exposed "poll once" semantics, and because we don't yet have "perfect wakers", it got polled twice - meaning it would resolve after the first future resolved.
No bug in the impl, just in the way we were testing it!
When debugging tuple
Merge
with mw we found something which hints at a potential bug in tupleMerge
. The test case was as follows:"done" should never be able to print in this case. When doing a
cargo run
it never triggered, but when running it through the debugger we could see it trigger. This may hint at a race condition!The text was updated successfully, but these errors were encountered: