summaryrefslogtreecommitdiff
path: root/cli/util
diff options
context:
space:
mode:
Diffstat (limited to 'cli/util')
-rw-r--r--cli/util/draw_thread.rs3
-rw-r--r--cli/util/fs.rs3
2 files changed, 4 insertions, 2 deletions
diff --git a/cli/util/draw_thread.rs b/cli/util/draw_thread.rs
index 028b20d00..2fd81a78a 100644
--- a/cli/util/draw_thread.rs
+++ b/cli/util/draw_thread.rs
@@ -2,6 +2,7 @@
use console_static_text::ConsoleStaticText;
use deno_core::parking_lot::Mutex;
+use deno_core::task::spawn_blocking;
use deno_runtime::ops::tty::ConsoleSize;
use once_cell::sync::Lazy;
use std::sync::Arc;
@@ -162,7 +163,7 @@ impl DrawThread {
internal_state.has_draw_thread = true;
let drawer_id = internal_state.drawer_id;
- tokio::task::spawn_blocking(move || {
+ spawn_blocking(move || {
let mut previous_size = console_size();
loop {
let mut delay_ms = 120;
diff --git a/cli/util/fs.rs b/cli/util/fs.rs
index 94ec24fe6..658002e3b 100644
--- a/cli/util/fs.rs
+++ b/cli/util/fs.rs
@@ -3,6 +3,7 @@
use deno_core::anyhow::Context;
use deno_core::error::AnyError;
pub use deno_core::normalize_path;
+use deno_core::task::spawn_blocking;
use deno_core::ModuleSpecifier;
use deno_runtime::deno_crypto::rand;
use deno_runtime::deno_node::PathClean;
@@ -503,7 +504,7 @@ impl LaxSingleProcessFsFlag {
// This uses a blocking task because we use a single threaded
// runtime and this is time sensitive so we don't want it to update
// at the whims of of whatever is occurring on the runtime thread.
- tokio::task::spawn_blocking({
+ spawn_blocking({
let token = token.clone();
let last_updated_path = last_updated_path.clone();
move || {