File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff 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 ) ;
You can’t perform that action at this time.
0 commit comments