Merge pull request #3903 from ethcore/test-mem-limit-deadlock
fix deadlock in queue drop
This commit is contained in:
commit
18965be047
@ -687,8 +687,12 @@ impl<K: Kind> Drop for VerificationQueue<K> {
|
||||
*self.state.0.lock() = State::Exit;
|
||||
self.state.1.notify_all();
|
||||
|
||||
// wake up all threads waiting for more work.
|
||||
self.more_to_verify.notify_all();
|
||||
// acquire this lock to force threads to reach the waiting point
|
||||
// if they're in-between the exit check and the more_to_verify wait.
|
||||
{
|
||||
let _more = self.verification.more_to_verify.lock().unwrap();
|
||||
self.more_to_verify.notify_all();
|
||||
}
|
||||
|
||||
// wait for all verifier threads to join.
|
||||
for thread in self.verifier_handles.drain(..) {
|
||||
|
Loading…
Reference in New Issue
Block a user