Added T:Send
bound to Packet<T>
to avoid specialized Drop
impl.
This commit is contained in:
parent
018eeb76f0
commit
123b5c124e
@ -372,7 +372,7 @@ unsafe impl<T: Send> Send for Sender<T> { }
|
||||
/// The sending-half of Rust's synchronous channel type. This half can only be
|
||||
/// owned by one task, but it can be cloned to send to other tasks.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub struct SyncSender<T> {
|
||||
pub struct SyncSender<T: Send> {
|
||||
inner: Arc<UnsafeCell<sync::Packet<T>>>,
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ use sync::mpsc::blocking::{self, WaitToken, SignalToken};
|
||||
use sync::mpsc::select::StartResult::{self, Installed, Abort};
|
||||
use sync::{Mutex, MutexGuard};
|
||||
|
||||
pub struct Packet<T> {
|
||||
pub struct Packet<T: Send> {
|
||||
/// Only field outside of the mutex. Just done for kicks, but mainly because
|
||||
/// the other shared channel already had the code implemented
|
||||
channels: AtomicUsize,
|
||||
|
Loading…
x
Reference in New Issue
Block a user