diff --git a/ethcore/src/verification/queue/mod.rs b/ethcore/src/verification/queue/mod.rs index b1ab7a130..f7de3eaa1 100644 --- a/ethcore/src/verification/queue/mod.rs +++ b/ethcore/src/verification/queue/mod.rs @@ -585,10 +585,12 @@ impl VerificationQueue { } /// Returns true if there is nothing currently in the queue. - /// TODO [ToDr] Optimize to avoid locking pub fn is_empty(&self) -> bool { let v = &self.verification; - v.unverified.lock().is_empty() && v.verifying.lock().is_empty() && v.verified.lock().is_empty() + + v.unverified.load_len() == 0 + && v.verifying.load_len() == 0 + && v.verified.load_len() == 0 } /// Get queue status.