Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 97a6fc6

Browse files
committed
Fix deadlock
1 parent 7341b88 commit 97a6fc6

File tree

1 file changed

+6
-0
lines changed
  • src/tools/rust-analyzer/crates/vfs-notify/src

1 file changed

+6
-0
lines changed

src/tools/rust-analyzer/crates/vfs-notify/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ impl NotifyActor {
131131
let (entry_tx, entry_rx) = unbounded();
132132
let (watch_tx, watch_rx) = unbounded();
133133
let processed = AtomicUsize::new(0);
134+
134135
config.load.into_par_iter().enumerate().for_each(|(i, entry)| {
135136
let do_watch = config.watch.contains(&i);
136137
if do_watch {
@@ -167,9 +168,13 @@ impl NotifyActor {
167168
})
168169
.unwrap();
169170
});
171+
172+
drop(watch_tx);
170173
for path in watch_rx {
171174
self.watch(&path);
172175
}
176+
177+
drop(entry_tx);
173178
for entry in entry_rx {
174179
match entry {
175180
loader::Entry::Files(files) => {
@@ -180,6 +185,7 @@ impl NotifyActor {
180185
}
181186
}
182187
}
188+
183189
self.sender
184190
.send(loader::Message::Progress {
185191
n_total,

0 commit comments

Comments
 (0)