We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd8a43c commit abccfa4Copy full SHA for abccfa4
src/libstd/io/timer.rs
@@ -227,6 +227,12 @@ mod test {
227
use thread::Thread;
228
use time::Duration;
229
230
+ #[test]
231
+ fn test_timer_send() {
232
+ let mut timer = Timer::new().unwrap();
233
+ Thread::spawn(move || timer.sleep(Duration::milliseconds(1)));
234
+ }
235
+
236
#[test]
237
fn test_io_timer_sleep_simple() {
238
let mut timer = Timer::new().unwrap();
src/libstd/sys/windows/timer.rs
@@ -48,9 +48,9 @@ pub enum Req {
48
RemoveTimer(libc::HANDLE, Sender<()>),
49
}
50
51
+unsafe impl Send for Timer {}
52
unsafe impl Send for Req {}
53
-
54
fn helper(input: libc::HANDLE, messages: Receiver<Req>, _: ()) {
55
let mut objs = vec![input];
56
let mut chans = vec![];
0 commit comments