diff options
Diffstat (limited to 'src/libstd/sync/mpsc/sync.rs')
| -rw-r--r-- | src/libstd/sync/mpsc/sync.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libstd/sync/mpsc/sync.rs b/src/libstd/sync/mpsc/sync.rs index ae96a2491dc..36b50b0d4af 100644 --- a/src/libstd/sync/mpsc/sync.rs +++ b/src/libstd/sync/mpsc/sync.rs @@ -55,9 +55,9 @@ pub struct Packet<T> { lock: Mutex<State<T>>, } -unsafe impl<T: Send + 'static> Send for Packet<T> { } +unsafe impl<T: Send> Send for Packet<T> { } -unsafe impl<T: Send + 'static> Sync for Packet<T> { } +unsafe impl<T: Send> Sync for Packet<T> { } struct State<T> { disconnected: bool, // Is the channel disconnected yet? @@ -75,7 +75,7 @@ struct State<T> { canceled: Option<&'static mut bool>, } -unsafe impl<T: Send + 'static> Send for State<T> {} +unsafe impl<T: Send> Send for State<T> {} /// Possible flavors of threads who can be blocked on this channel. enum Blocker { @@ -113,7 +113,7 @@ pub enum Failure { /// Atomically blocks the current thread, placing it into `slot`, unlocking `lock` /// in the meantime. This re-locks the mutex upon returning. -fn wait<'a, 'b, T: Send + 'static>(lock: &'a Mutex<State<T>>, +fn wait<'a, 'b, T: Send>(lock: &'a Mutex<State<T>>, mut guard: MutexGuard<'b, State<T>>, f: fn(SignalToken) -> Blocker) -> MutexGuard<'a, State<T>> @@ -136,7 +136,7 @@ fn wakeup<T>(token: SignalToken, guard: MutexGuard<State<T>>) { token.signal(); } -impl<T: Send + 'static> Packet<T> { +impl<T: Send> Packet<T> { pub fn new(cap: uint) -> Packet<T> { Packet { channels: AtomicUsize::new(1), @@ -412,7 +412,7 @@ impl<T: Send + 'static> Packet<T> { } #[unsafe_destructor] -impl<T: Send + 'static> Drop for Packet<T> { +impl<T: Send> Drop for Packet<T> { fn drop(&mut self) { assert_eq!(self.channels.load(Ordering::SeqCst), 0); let mut guard = self.lock.lock().unwrap(); |
