提交 1502b119 编写于 作者: B bors

auto merge of #11199 : alexcrichton/rust/windows-isnt-waiting, r=pcwalton

Turns out with an argument of 0 the function always returns immediately!

Closes #11003
...@@ -1019,7 +1019,6 @@ pub fn stress_factor() -> uint { ...@@ -1019,7 +1019,6 @@ pub fn stress_factor() -> uint {
}) })
#[test] #[test]
#[ignore(cfg(windows))] // FIXME(#11003)
fn send_from_outside_runtime() { fn send_from_outside_runtime() {
let (p, c) = Chan::<int>::new(); let (p, c) = Chan::<int>::new();
let (p1, c1) = Chan::new(); let (p1, c1) = Chan::new();
...@@ -1044,7 +1043,6 @@ fn send_from_outside_runtime() { ...@@ -1044,7 +1043,6 @@ fn send_from_outside_runtime() {
} }
#[test] #[test]
#[ignore(cfg(windows))] // FIXME(#11003)
fn recv_from_outside_runtime() { fn recv_from_outside_runtime() {
let (p, c) = Chan::<int>::new(); let (p, c) = Chan::<int>::new();
let (dp, dc) = Chan::new(); let (dp, dc) = Chan::new();
...@@ -1061,7 +1059,6 @@ fn recv_from_outside_runtime() { ...@@ -1061,7 +1059,6 @@ fn recv_from_outside_runtime() {
} }
#[test] #[test]
#[ignore(cfg(windows))] // FIXME(#11003)
fn no_runtime() { fn no_runtime() {
let (p1, c1) = Chan::<int>::new(); let (p1, c1) = Chan::<int>::new();
let (p2, c2) = Chan::<int>::new(); let (p2, c2) = Chan::<int>::new();
......
...@@ -286,7 +286,7 @@ pub unsafe fn unlock(l: *c_void) { ...@@ -286,7 +286,7 @@ pub unsafe fn unlock(l: *c_void) {
pub unsafe fn wait(cond: *c_void, m: *c_void) { pub unsafe fn wait(cond: *c_void, m: *c_void) {
unlock(m); unlock(m);
WaitForSingleObject(cond as HANDLE, 0); WaitForSingleObject(cond as HANDLE, libc::INFINITE);
lock(m); lock(m);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册