Skip to content

Commit

Permalink
Skip setting Send/Sync in non-send mode for UserDataCell
Browse files Browse the repository at this point in the history
  • Loading branch information
khvzak committed Oct 30, 2024
1 parent a8d5f23 commit 6066089
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/userdata/cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ pub(crate) struct UserDataCell<T> {
value: UnsafeCell<T>,
}

#[cfg(feature = "send")]
unsafe impl<T: Send> Send for UserDataCell<T> {}
#[cfg(feature = "send")]
unsafe impl<T: Send> Sync for UserDataCell<T> {}

impl<T> UserDataCell<T> {
Expand Down

0 comments on commit 6066089

Please sign in to comment.