Skip to content

Commit

Permalink
Added T:Send bound to Queue<T> to avoid specialized Drop impl.
Browse files Browse the repository at this point in the history
  • Loading branch information
pnkfelix committed Mar 24, 2015
1 parent 26a79e3 commit 1249e60
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/libstd/sync/mpsc/mpsc_queue.rs
Expand Up @@ -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>>,
}
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/sync/mpsc/shared.rs
Expand Up @@ -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?
Expand Down

0 comments on commit 1249e60

Please sign in to comment.