-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
A-cargo-apiArea: cargo-the-library API and internal code issuesArea: cargo-the-library API and internal code issues
Description
If a Job ever panics, Cargo will hang indefinitely. I've seen this a few times during development (and a recently exposed bug in metabuild).
The issue is that if this line ever panics:
cargo/src/cargo/core/compiler/job_queue.rs
Line 405 in eb38ad0
let res = job.run(fresh, &JobState { tx: my_tx.clone() }); |
the following line never sends the Message::Finish
message, and the main thread hangs waiting for the finish message.
Dealing with this is a little more difficult than I expected. catch_unwind
can't be used because Message
is not unwind safe due to the reference. Any ideas for an easy way to deal with it? Is this worth fixing?
Metadata
Metadata
Assignees
Labels
A-cargo-apiArea: cargo-the-library API and internal code issuesArea: cargo-the-library API and internal code issues