Added T:Send bound to Queue<T> to avoid specialized Drop impl.

This commit is contained in:
Felix S. Klock II 2015-03-21 13:33:12 +01:00
parent 123b5c124e
commit 5f57fd591d

View File

@ -57,7 +57,7 @@ struct Node<T> {
/// but it can be safely shared in an Arc if it is guaranteed that there
/// is only one popper and one pusher touching the queue at any one point in
/// time.
pub struct Queue<T> {
pub struct Queue<T: Send> {
// consumer fields
tail: UnsafeCell<*mut Node<T>>, // where to pop from
tail_prev: AtomicPtr<Node<T>>, // where to pop from