Tracing shutdown and changed order of IoManager shutdown process

This commit is contained in:
Tomasz Drwięga
2016-04-06 23:45:19 +02:00
parent fd03f58eae
commit d4f0902968
3 changed files with 7 additions and 1 deletions

View File

@@ -431,12 +431,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.");
}
}