[WASM + Winit + Wgpu] Weird error about waiting on the main thread despite not waiting on the main thread

This might be a bug introduced by the crossbeam-channel change that happened in 1.67.0 [1]. The docs for try_recv claims that it "will never block". But it does sometimes:

That is my understanding, yes. The types in std::sync::atomics use compiler intrinsics, and there is no "atomic wait" intrinsic.


  1. There is an open issue on the upstream crossbeam repo: crossbeam::channel::Receiver::try_recv can block forever if sending thread is blocked · Issue #997 · crossbeam-rs/crossbeam (github.com) I added a link back here to that thread. ↩︎

2 Likes