summaryrefslogtreecommitdiff
path: root/cli/ops/dispatch_json.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/ops/dispatch_json.rs')
-rw-r--r--cli/ops/dispatch_json.rs10
1 files changed, 1 insertions, 9 deletions
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()))
}
}