diff options
Diffstat (limited to 'src/libstd/sys/common/helper_thread.rs')
| -rw-r--r-- | src/libstd/sys/common/helper_thread.rs | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/src/libstd/sys/common/helper_thread.rs b/src/libstd/sys/common/helper_thread.rs index 255f474d4f4..dc1ae85efe0 100644 --- a/src/libstd/sys/common/helper_thread.rs +++ b/src/libstd/sys/common/helper_thread.rs @@ -30,7 +30,7 @@ use sync::{StaticMutex, StaticCondvar}; use sync::mpsc::{channel, Sender, Receiver}; use sys::helper_signal; -use thread::Thread; +use thread; /// A structure for management of a helper thread. /// @@ -81,7 +81,7 @@ impl<M: Send> Helper<M> { /// /// This function is safe to be called many times. pub fn boot<T, F>(&'static self, f: F, helper: fn(helper_signal::signal, Receiver<M>, T)) where - T: Send, + T: Send + 'static, F: FnOnce() -> T, { unsafe { @@ -95,7 +95,7 @@ impl<M: Send> Helper<M> { let receive = RaceBox(receive); let t = f(); - Thread::spawn(move || { + thread::spawn(move || { helper(receive.0, rx, t); let _g = self.lock.lock().unwrap(); *self.shutdown.get() = true; | 
