summaryrefslogtreecommitdiff
path: root/ext/io/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/io/lib.rs')
-rw-r--r--ext/io/lib.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/io/lib.rs b/ext/io/lib.rs
index 49e4ab714..6dec7c3a7 100644
--- a/ext/io/lib.rs
+++ b/ext/io/lib.rs
@@ -2,6 +2,7 @@
use deno_core::error::AnyError;
use deno_core::op;
+use deno_core::task::spawn_blocking;
use deno_core::AsyncMutFuture;
use deno_core::AsyncRefCell;
use deno_core::AsyncResult;
@@ -350,7 +351,7 @@ impl StdFileResourceInner {
}
}
};
- let (cell_value, result) = tokio::task::spawn_blocking(move || {
+ let (cell_value, result) = spawn_blocking(move || {
let result = action(&mut cell_value);
(cell_value, result)
})
@@ -372,7 +373,7 @@ impl StdFileResourceInner {
// we want to restrict this to one async action at a time
let _permit = self.cell_async_task_queue.acquire().await;
- tokio::task::spawn_blocking(action).await.unwrap()
+ spawn_blocking(action).await.unwrap()
}
}