mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-10-01 12:20:39 +00:00
runtime: test creating a single-threaded runtime. (#1717)
This commit is contained in:
parent
02f7264008
commit
64c26ab1ee
@ -15,6 +15,12 @@ use std::time::Duration;
|
||||
|
||||
thread_local!(static FOO: Cell<u32> = Cell::new(0));
|
||||
|
||||
#[test]
|
||||
fn single_thread() {
|
||||
// No panic when starting a runtime w/ a single thread
|
||||
let _ = Builder::new().num_threads(1).build();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn shutdown_drops_futures() {
|
||||
for _ in 0..1_000 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user