Skip to content

Commit 76a3d31

Browse files
authored
Merge pull request #4210 from tiif/small-fix-2
Resolve more FIXMEs
2 parents 8ad3a49 + 88ceefe commit 76a3d31

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

tests/pass-dep/libc/libc-pipe.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -56,23 +56,19 @@ fn test_pipe_threaded() {
5656
assert_eq!(res, 5);
5757
assert_eq!(buf, "abcde".as_bytes());
5858
});
59-
// FIXME: we should yield here once blocking is implemented.
60-
//thread::yield_now();
59+
thread::yield_now();
6160
let data = "abcde".as_bytes().as_ptr();
6261
let res = unsafe { libc::write(fds[1], data as *const libc::c_void, 5) };
6362
assert_eq!(res, 5);
6463
thread1.join().unwrap();
6564

6665
// Read and write from different direction
6766
let thread2 = thread::spawn(move || {
68-
// FIXME: we should yield here once blocking is implemented.
69-
//thread::yield_now();
67+
thread::yield_now();
7068
let data = "12345".as_bytes().as_ptr();
7169
let res = unsafe { libc::write(fds[1], data as *const libc::c_void, 5) };
7270
assert_eq!(res, 5);
7371
});
74-
// FIXME: we should not yield here once blocking is implemented.
75-
thread::yield_now();
7672
let mut buf: [u8; 5] = [0; 5];
7773
let res = unsafe { libc::read(fds[0], buf.as_mut_ptr().cast(), buf.len() as libc::size_t) };
7874
assert_eq!(res, 5);

0 commit comments

Comments
 (0)