Skip to content

Commit

Permalink
rt: specify that runtime should have task scheduler (#1839)
Browse files Browse the repository at this point in the history
* Specify that runtime should have task scheduler

* Even more detailed panic message for incorrect task spawn
  • Loading branch information
olegnn authored and carllerche committed Nov 27, 2019
1 parent 632ee50 commit 2cd1d74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tokio/src/runtime/global.rs
Expand Up @@ -47,7 +47,7 @@ where
// Explicit drop of `future` silences the warning that `future` is
// not used when neither rt-* feature flags are enabled.
drop(future);
panic!("must be called from the context of Tokio runtime");
panic!("must be called from the context of Tokio runtime configured with either `basic_scheduler` or `threaded_scheduler`");
}
})
}
Expand Down

0 comments on commit 2cd1d74

Please sign in to comment.