Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit 5e990eb

Browse files
committed
Wait for progress-thread before invoking pbh.handle()
1 parent 658d0f8 commit 5e990eb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/build/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ impl BuildQueue {
381381
let notifier = build.notifier;
382382

383383
// use this thread to propagate the progress messages until the sender is dropped.
384-
thread::Builder::new()
384+
let progress_thread = thread::Builder::new()
385385
.name("progress-notifier".into())
386386
.spawn(move || {
387387
// window/progress notification that we are about to build
@@ -413,6 +413,8 @@ impl BuildQueue {
413413
let mut blocked = internals.blocked.lock().unwrap();
414414
pbh.blocked_threads.extend(blocked.drain(..));
415415
}
416+
// wait for progress to complete before starting analysis
417+
progress_thread.join().expect("progress-notifier panicked!");
416418
pbh.handle(result);
417419

418420
// Remove the in-progress marker from the build queue.

0 commit comments

Comments
 (0)