Merge pull request #893 from ethcore/closing

Additional logging and friendlier error messages
This commit is contained in:
Arkadiy Paronyan
2016-04-07 12:36:19 +02:00
7 changed files with 70 additions and 42 deletions

View File

@@ -442,12 +442,14 @@ impl MayPanic for BlockQueue {
impl Drop for BlockQueue {
fn drop(&mut self) {
trace!(target: "shutdown", "[BlockQueue] Closing...");
self.clear();
self.deleting.store(true, AtomicOrdering::Release);
self.more_to_verify.notify_all();
for t in self.verifiers.drain(..) {
t.join().unwrap();
}
trace!(target: "shutdown", "[BlockQueue] Closed.");
}
}