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
Probably only tokio_unstable v1.35.0 relevant for this issue but just in case: cargo tree:
├── async-ssh2-tokio v0.7.1
│ │ │ ├── tokio v1.35.0
│ │ │ │ └── tokio-macros v2.2.0 (proc-macro)
│ │ │ ├── tokio-stream v0.1.14
│ │ │ │ └── tokio v1.35.0 (*)
│ │ ├── tokio v1.35.0 (*)
│ │ └── tokio-util v0.7.2
│ │ ├── tokio v1.35.0 (*)
│ └── tokio v1.35.0 (*)
│ │ ├── tokio v1.35.0 (*)
│ │ ├── tokio-util v0.7.2 (*)
│ │ ├── tokio v1.35.0 (*)
│ │ ├── tokio v1.35.0 (*)
│ │ └── tokio-native-tls v0.3.1
│ │ └── tokio v1.35.0 (*)
│ ├── tokio v1.35.0 (*)
│ ├── tokio-native-tls v0.3.1 (*)
├── signal-hook-tokio v0.3.1
│ └── tokio v1.35.0 (*)
├── tokio v1.35.0 (*)
└── tokio-util v0.6.10
└── tokio v1.35.0 (*)
.cargo/config.toml
[build]
rustflags = ["--cfg", "tokio_unstable"]
Platform
The output of uname -a (UNIX):
Linux markusbyte 5.10.0-26-amd64 #1 SMP Debian 5.10.197-1 (2023-09-29) x86_64 GNU/Linux
Description
I tried this code:
use futures::future::join_all;
use std::panic;
use std::time::Duration;
use tokio::runtime::UnhandledPanic;
use tokio::spawn;
use tokio::time::interval;
fn main() {
tokio::runtime::Builder::new_multi_thread()
.unhandled_panic(UnhandledPanic::ShutdownRuntime)
.enable_all()
.build()
.unwrap()
.block_on(async {
let mut tasks = vec![];
tasks.push(spawn(async {
let mut interval = interval(Duration::from_millis(10));
loop {
interval.tick().await;
}
}));
tasks.push(spawn(async {
panic!("boom");
}));
join_all(tasks).await;
});
}
I expected to see this happen:
thread 'tokio-runtime-worker' panicked at src/main.rs:23:17:
boom
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
exit code 101
Instead, this happened:
thread 'tokio-runtime-worker' panicked at src/main.rs:23:17:
boom
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
The process is still running and does not quit.
The text was updated successfully, but these errors were encountered:
This is intended behavior. From the original issue:
When the multi-threaded runtime is selected, these option would have no effect.
Implementing for the multi-threaded runtime would be required before stabilizing
the API but because the implementation is much harder, we should first gather data.
Version
Probably only tokio_unstable v1.35.0 relevant for this issue but just in case:
cargo tree
:.cargo/config.toml
Platform
The output of
uname -a
(UNIX):Description
I tried this code:
I expected to see this happen:
Instead, this happened:
The process is still running and does not quit.
The text was updated successfully, but these errors were encountered: