From 724e39f13f2f144703ce00e156cacfc653d8e209 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Fri, 7 Feb 2020 17:54:44 -0500 Subject: Enable thread pool for blocking ops (#3912) --- cli/ops/dispatch_json.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'cli/ops/dispatch_json.rs') diff --git a/cli/ops/dispatch_json.rs b/cli/ops/dispatch_json.rs index 0806001ab..60c57ef67 100644 --- a/cli/ops/dispatch_json.rs +++ b/cli/ops/dispatch_json.rs @@ -103,15 +103,7 @@ where if is_sync { Ok(JsonOp::Sync(f()?)) } else { - // TODO(ry) use thread pool. - let fut = crate::tokio_util::spawn_thread(f); - /* - let fut = async move { - tokio::task::spawn_blocking(move || f()) - .await - .map_err(ErrBox::from)? - }.boxed_local(); - */ + let fut = async move { tokio::task::spawn_blocking(f).await.unwrap() }; Ok(JsonOp::Async(fut.boxed_local())) } } -- cgit v1.2.3