Stream: rust-toolchain

Topic: std::thread


view this post on Zulip Alexandru Ene (Jun 15 2021 at 21:18):

Is the official guideline to not use any std::thread in wasm32-wasi at all as it's considered unstable so far?

I'm asking because I'm pretty sure std::thread::sleep() used to work but some months ago now it panics because thread::sleep(): unexpected result of poll_oneoff.

It probably didn't used to work as I see the file hasn't been touched in a while. Unless something changed in the VMs impls

view this post on Zulip Alex Crichton (Jun 15 2021 at 21:27):

sleep is weird in that it can probably work off-the-web but probably won't work on the web b/c the main thread can't sleep. Otherwise though std::thread, even on wasm32-wasi, can't spawn new threads


Last updated: Nov 22 2024 at 17:03 UTC