diff options
Diffstat (limited to 'src/time/driver/atomic_stack.rs')
-rw-r--r-- | src/time/driver/atomic_stack.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/time/driver/atomic_stack.rs b/src/time/driver/atomic_stack.rs index 7e5a83f..5dcc472 100644 --- a/src/time/driver/atomic_stack.rs +++ b/src/time/driver/atomic_stack.rs @@ -1,5 +1,5 @@ use crate::time::driver::Entry; -use crate::time::Error; +use crate::time::error::Error; use std::ptr; use std::sync::atomic::AtomicPtr; @@ -95,7 +95,7 @@ impl Iterator for AtomicStackEntries { type Item = Arc<Entry>; fn next(&mut self) -> Option<Self::Item> { - if self.ptr.is_null() { + if self.ptr.is_null() || self.ptr == SHUTDOWN { return None; } @@ -118,7 +118,7 @@ impl Drop for AtomicStackEntries { fn drop(&mut self) { for entry in self { // Flag the entry as errored - entry.error(); + entry.error(Error::shutdown()); } } } |