Implement UnwindSafe/RefUnwindSafe
This commit is contained in:
parent
5c5663e220
commit
c680f8d84f
|
@ -13,8 +13,8 @@ categories = ["concurrency"]
|
|||
readme = "README.md"
|
||||
|
||||
[dependencies]
|
||||
cache-padded = "1.0.0"
|
||||
cache-padded = "1.1.1"
|
||||
|
||||
[dev-dependencies]
|
||||
easy-parallel = "2.1.0"
|
||||
fastrand = "1.0.0"
|
||||
easy-parallel = "3.1.0"
|
||||
fastrand = "1.3.3"
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
use std::error;
|
||||
use std::fmt;
|
||||
use std::panic::{RefUnwindSafe, UnwindSafe};
|
||||
use std::sync::atomic::{self, AtomicUsize, Ordering};
|
||||
|
||||
use crate::bounded::Bounded;
|
||||
|
@ -62,6 +63,9 @@ pub struct ConcurrentQueue<T>(Inner<T>);
|
|||
unsafe impl<T: Send> Send for ConcurrentQueue<T> {}
|
||||
unsafe impl<T: Send> Sync for ConcurrentQueue<T> {}
|
||||
|
||||
impl<T> UnwindSafe for ConcurrentQueue<T> {}
|
||||
impl<T> RefUnwindSafe for ConcurrentQueue<T> {}
|
||||
|
||||
enum Inner<T> {
|
||||
Bounded(Bounded<T>),
|
||||
Unbounded(Unbounded<T>),
|
||||
|
|
Loading…
Reference in New Issue