()
| 526 | #[tokio::test] |
| 527 | #[cfg_attr(miri, ignore)] |
| 528 | async fn resume_separate_thread2() { |
| 529 | // This test will poll the following future on two threads. Catching a |
| 530 | // signal requires looking up TLS information to determine whether it's a |
| 531 | // trap to handle or not, so that must be preserved correctly across threads. |
| 532 | execute_across_threads(async { |
| 533 | let mut store = async_store(); |
| 534 | let module = Module::new( |
| 535 | store.engine(), |
| 536 | " |
| 537 | (module |
| 538 | (import \"\" \"\" (func)) |
| 539 | (func $start |
| 540 | call 0 |
| 541 | unreachable) |
| 542 | (start $start) |
| 543 | ) |
| 544 | ", |
| 545 | ) |
| 546 | .unwrap(); |
| 547 | let func = Func::wrap_async(&mut store, |_, _: ()| { |
| 548 | Box::new(async { |
| 549 | tokio::task::yield_now().await; |
| 550 | }) |
| 551 | }); |
| 552 | let result = Instance::new_async(&mut store, &module, &[func.into()]).await; |
| 553 | assert!(result.is_err()); |
| 554 | }) |
| 555 | .await; |
| 556 | } |
| 557 | |
| 558 | #[tokio::test] |
| 559 | #[cfg_attr(miri, ignore)] |
nothing calls this directly
no test coverage detected