rt: worker_threads must be non-zero (#2947)

Co-authored-by: Alice Ryhl <[email protected]>
This commit is contained in:
Lucio Franco
2020-10-12 15:15:40 -04:00
committed by GitHub
co-authored by Alice Ryhl
parent 891de3271d
commit 07802b2c84
3 changed files with 8 additions and 5 deletions
+2 -3
View File
@@ -45,9 +45,8 @@ fn many_signals(bench: &mut Bencher) {
let num_signals = 10;
let (tx, mut rx) = mpsc::channel(num_signals);
let rt = runtime::Builder::new_multi_thread()
// Intentionally single threaded to measure delays in propagating wakes
.worker_threads(0)
// Intentionally single threaded to measure delays in propagating wakes
let rt = runtime::Builder::new_current_thread()
.enable_all()
.build()
.unwrap();
+1 -2
View File
@@ -49,8 +49,7 @@ fn uncontended_concurrent_multi(b: &mut Bencher) {
}
fn uncontended_concurrent_single(b: &mut Bencher) {
let rt = tokio::runtime::Builder::new_multi_thread()
.worker_threads(0)
let rt = tokio::runtime::Builder::new_current_thread()
.build()
.unwrap();