Skip to content

Commit c680f8d

Browse files
author
Stjepan Glavina
committed
Implement UnwindSafe/RefUnwindSafe
1 parent 5c5663e commit c680f8d

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ categories = ["concurrency"]
1313
readme = "README.md"
1414

1515
[dependencies]
16-
cache-padded = "1.0.0"
16+
cache-padded = "1.1.1"
1717

1818
[dev-dependencies]
19-
easy-parallel = "2.1.0"
20-
fastrand = "1.0.0"
19+
easy-parallel = "3.1.0"
20+
fastrand = "1.3.3"

src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232

3333
use std::error;
3434
use std::fmt;
35+
use std::panic::{RefUnwindSafe, UnwindSafe};
3536
use std::sync::atomic::{self, AtomicUsize, Ordering};
3637

3738
use crate::bounded::Bounded;
@@ -62,6 +63,9 @@ pub struct ConcurrentQueue<T>(Inner<T>);
6263
unsafe impl<T: Send> Send for ConcurrentQueue<T> {}
6364
unsafe impl<T: Send> Sync for ConcurrentQueue<T> {}
6465

66+
impl<T> UnwindSafe for ConcurrentQueue<T> {}
67+
impl<T> RefUnwindSafe for ConcurrentQueue<T> {}
68+
6569
enum Inner<T> {
6670
Bounded(Bounded<T>),
6771
Unbounded(Unbounded<T>),

0 commit comments

Comments
 (0)