Added T:Send
bound to Queue<T>
to avoid specialized Drop impl.
This commit is contained in:
parent
26a79e3c20
commit
1249e60891
@ -72,7 +72,7 @@ struct Node<T> {
|
||||
/// The multi-producer single-consumer structure. This is not cloneable, but it
|
||||
/// may be safely shared so long as it is guaranteed that there is only one
|
||||
/// popper at a time (many pushers are allowed).
|
||||
pub struct Queue<T> {
|
||||
pub struct Queue<T: Send> {
|
||||
head: AtomicPtr<Node<T>>,
|
||||
tail: UnsafeCell<*mut Node<T>>,
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ const MAX_STEALS: isize = 5;
|
||||
#[cfg(not(test))]
|
||||
const MAX_STEALS: isize = 1 << 20;
|
||||
|
||||
pub struct Packet<T> {
|
||||
pub struct Packet<T: Send> {
|
||||
queue: mpsc::Queue<T>,
|
||||
cnt: AtomicIsize, // How many items are on this channel
|
||||
steals: isize, // How many times has a port received without blocking?
|
||||
|
Loading…
Reference in New Issue
Block a user