Skip to content

Commit

Permalink
🐛 fix queue send bound (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xudong-Huang committed Mar 30, 2021
1 parent d1cd331 commit 37015c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions may_queue/src/mpsc_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ pub struct Queue<T> {
tail: UnsafeCell<*mut Node<T>>,
}

unsafe impl<T> Send for Queue<T> {}
unsafe impl<T> Sync for Queue<T> {}
unsafe impl<T: Send> Send for Queue<T> {}
unsafe impl<T: Send> Sync for Queue<T> {}

impl<T> Queue<T> {
/// Creates a new queue that is safe to share among multiple producers and
Expand Down
4 changes: 2 additions & 2 deletions may_queue/src/mpsc_list_v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ pub struct Queue<T> {
tail: UnsafeCell<*mut Node<T>>,
}

unsafe impl<T> Send for Queue<T> {}
unsafe impl<T> Sync for Queue<T> {}
unsafe impl<T: Send> Send for Queue<T> {}
unsafe impl<T: Send> Sync for Queue<T> {}

impl<T> Queue<T> {
/// Creates a new queue that is safe to share among multiple producers and
Expand Down

0 comments on commit 37015c0

Please # to comment.