Skip to content

Commit 3222939

Browse files
Rollup merge of #151309 - main, r=alexcrichton
fix: thread creation failed on the wasm32-wasip1-threads target. wasm32-wasip1-threads target cannot create thread since nightly-2026-01-16. This commit (c1bcae0) broken it. It in #151016 This pull-request fix that issue.
2 parents 5a96067 + b35f80f commit 3222939

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

library/std/src/sys/thread/unix.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ impl Thread {
4949
// WASI does not support threading via pthreads. While wasi-libc provides
5050
// pthread stubs, pthread_create returns EAGAIN, which causes confusing
5151
// errors. We return UNSUPPORTED_PLATFORM directly instead.
52-
if cfg!(target_os = "wasi") {
52+
if cfg!(all(target_os = "wasi", not(target_feature = "atomics"))) {
5353
return Err(io::Error::UNSUPPORTED_PLATFORM);
5454
}
5555

0 commit comments

Comments
 (0)