summaryrefslogtreecommitdiffstats
path: root/src/shell/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/shell/mod.rs')
-rw-r--r--src/shell/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shell/mod.rs b/src/shell/mod.rs
index f909dca..e7160be 100644
--- a/src/shell/mod.rs
+++ b/src/shell/mod.rs
@@ -104,7 +104,7 @@ pub async fn main() -> anyhow::Result<i32> {
watcher
.watch(&dir, notify::RecursiveMode::Recursive)
.unwrap();
- std::thread::spawn(move || {
+ async_std::task::spawn(blocking::unblock(move || {
while let Ok(event) = sync_watch_r.recv() {
let watch_w = watch_w.clone();
let send_failed =
@@ -115,7 +115,7 @@ pub async fn main() -> anyhow::Result<i32> {
break;
}
}
- });
+ }));
let event_w = event_w.clone();
async_std::task::spawn(async move {
while watch_r.recv().await.is_ok() {