Skip to content

Commit a076001

Browse files
committed
Add Send and Sync impls for Retained
1 parent 2cebfce commit a076001

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/rc/retained.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ pub struct Retained<T> {
5151
phantom: PhantomData<T>,
5252
}
5353

54+
// SAFETY: TODO
55+
unsafe impl<T: Sync + Send> Send for Retained<T> {}
56+
57+
// SAFETY: TODO
58+
unsafe impl<T: Sync + Send> Sync for Retained<T> {}
59+
60+
5461
impl<T> Retained<T> {
5562
/// Constructs a `Retained<T>` to an object that already has a +1 retain
5663
/// count. This will not retain the object.

0 commit comments

Comments
 (0)