wasm: support rt-multi-thread with wasm32-wasi-preview1-threads (#6510)

This commit is contained in:
LongYinan
2024-04-24 09:45:54 +02:00
committed by GitHub
parent a73d6bf33a
commit 9ed595767d
14 changed files with 127 additions and 125 deletions
+1 -5
View File
@@ -1,8 +1,4 @@
#![cfg(all(
feature = "macros",
feature = "rt-multi-thread",
not(target_os = "wasi")
))]
#![cfg(all(feature = "macros", feature = "rt-multi-thread"))]
#[tokio::main]
async fn basic_main() -> usize {
+4 -1
View File
@@ -4,7 +4,10 @@ use futures::channel::oneshot;
use futures::executor::block_on;
use std::thread;
#[cfg_attr(target_os = "wasi", ignore = "WASI: std::thread::spawn not supported")]
#[cfg_attr(
not(feature = "rt-multi-thread"),
ignore = "WASI: std::thread::spawn not supported"
)]
#[test]
fn join_with_select() {
block_on(async {