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:
|
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?
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
the following line never sends the
Message::Finishmessage, and the main thread hangs waiting for the finish message.Dealing with this is a little more difficult than I expected.
catch_unwindcan't be used becauseMessageis not unwind safe due to the reference. Any ideas for an easy way to deal with it? Is this worth fixing?