summaryrefslogtreecommitdiffstats
path: root/tokio/src/task
diff options
context:
space:
mode:
authorCarl Lerche <me@carllerche.com>2020-01-07 07:53:40 -0800
committerGitHub <noreply@github.com>2020-01-07 07:53:40 -0800
commit45da5f3510a61599c89dc458ecc859f13a81e255 (patch)
treec85b31879c37f06d3c58cd7d6db99c7e2ce2cf89 /tokio/src/task
parent855d39f849cc16d3c68df5abf0bbb28e3351cdf0 (diff)
rt: cleanup runtime::context (#2063)
Tweak context to remove more fns and usage of `Option`. Remove `ThreadContext` struct as it is reduced to just `Handle`. Avoid passing around individual driver handles and instead limit to the `runtime::Handle` struct.
Diffstat (limited to 'tokio/src/task')
-rw-r--r--tokio/src/task/spawn.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tokio/src/task/spawn.rs b/tokio/src/task/spawn.rs
index c4589308..4e19f559 100644
--- a/tokio/src/task/spawn.rs
+++ b/tokio/src/task/spawn.rs
@@ -123,7 +123,7 @@ doc_rt_core! {
T: Future + Send + 'static,
T::Output: Send + 'static,
{
- let spawn_handle = runtime::context::ThreadContext::spawn_handle()
+ let spawn_handle = runtime::context::spawn_handle()
.expect("must be called from the context of Tokio runtime configured with either `basic_scheduler` or `threaded_scheduler`");
spawn_handle.spawn(task)
}