You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[package]
name = "test-tokio-madsim"version = "0.1.0"edition = "2021"# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
tokio = { version = "0.2", package = "madsim-tokio", features = ["rt", "macros", "rt-multi-thread"] }
thread 'main' panicked at /Users/tianyizhuang/.cargo/registry/src/index.crates.io-6f17d22bba15001f/madsim-0.2.23/src/sim/runtime/context.rs:27:44:
there is no reactor running, must be called from the context of a Madsim runtime
stack backtrace:
0: rust_begin_unwind
at /rustc/4578435e1695863d921c7763d5a0add98f8e3869/library/std/src/panicking.rs:597:5
1: core::panicking::panic_fmt
at /rustc/4578435e1695863d921c7763d5a0add98f8e3869/library/core/src/panicking.rs:72:14
2: core::panicking::panic_display
at /rustc/4578435e1695863d921c7763d5a0add98f8e3869/library/core/src/panicking.rs:178:5
3: core::panicking::panic_str
at /rustc/4578435e1695863d921c7763d5a0add98f8e3869/library/core/src/panicking.rs:152:5
4: core::option::expect_failed
at /rustc/4578435e1695863d921c7763d5a0add98f8e3869/library/core/src/option.rs:1979:5
5: core::option::Option<T>::expect
at /rustc/4578435e1695863d921c7763d5a0add98f8e3869/library/core/src/option.rs:888:21
6: madsim::sim::runtime::context::current_task::{{closure}}
at /Users/tianyizhuang/.cargo/registry/src/index.crates.io-6f17d22bba15001f/madsim-0.2.23/src/sim/runtime/context.rs:27:22
7: std::thread::local::LocalKey<T>::try_with
at /rustc/4578435e1695863d921c7763d5a0add98f8e3869/library/std/src/thread/local.rs:270:16
8: std::thread::local::LocalKey<T>::with
at /rustc/4578435e1695863d921c7763d5a0add98f8e3869/library/std/src/thread/local.rs:246:9
9: madsim::sim::runtime::context::current_task
at /Users/tianyizhuang/.cargo/registry/src/index.crates.io-6f17d22bba15001f/madsim-0.2.23/src/sim/runtime/context.rs:27:5
10: madsim::sim::task::Spawner::current
at /Users/tianyizhuang/.cargo/registry/src/index.crates.io-6f17d22bba15001f/madsim-0.2.23/src/sim/task/mod.rs:577:20
11: madsim::sim::task::spawn
at /Users/tianyizhuang/.cargo/registry/src/index.crates.io-6f17d22bba15001f/madsim-0.2.23/src/sim/task/mod.rs:655:5
12: test_tokio_madsim::main
at ./src/main.rs:4:5
13: core::ops::function::FnOnce::call_once
at /rustc/4578435e1695863d921c7763d5a0add98f8e3869/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
The text was updated successfully, but these errors were encountered:
Related #175
Reproduce
The text was updated successfully, but these errors were encountered: