@@ -112,7 +112,7 @@ unsafe fn run_high_level_loop(loop_ptr: *libc::c_void,
112
112
let async_handle = ptr:: addr_of ( async ) ;
113
113
// associate the async handle with the loop
114
114
ll:: async_init ( loop_ptr, async_handle, high_level_wake_up_cb) ;
115
-
115
+
116
116
// initialize our loop data and store it in the loop
117
117
let data: global_loop_data = {
118
118
async_handle: async_handle,
@@ -256,7 +256,7 @@ crust fn tear_down_close_cb(handle: *ll::uv_async_t) unsafe {
256
256
handle) ) ;
257
257
// TODO: iterate through open handles on the loop and uv_close()
258
258
// them all
259
- let data = ll:: get_data_for_uv_handle ( handle) as * global_loop_data ;
259
+ // let data = ll::get_data_for_uv_handle(handle) as *global_loop_data;
260
260
}
261
261
262
262
fn high_level_tear_down ( data : * global_loop_data ) unsafe {
@@ -458,12 +458,11 @@ mod test {
458
458
} ;
459
459
log ( debug, "exiting simple timer cb" ) ;
460
460
}
461
- # [ test ]
462
- fn test_uv_hl_simple_timer ( ) unsafe {
461
+
462
+ fn impl_uv_hl_simple_timer ( hl_loop : high_level_loop ) unsafe {
463
463
let exit_po = comm:: port :: < bool > ( ) ;
464
464
let exit_ch = comm:: chan ( exit_po) ;
465
465
let exit_ch_ptr = ptr:: addr_of ( exit_ch) ;
466
- let hl_loop = get_global_loop ( ) ;
467
466
let timer_handle = ll:: timer_t ( ) ;
468
467
let timer_ptr = ptr:: addr_of ( timer_handle) ;
469
468
interact ( hl_loop) { |loop_ptr|
@@ -489,4 +488,11 @@ mod test {
489
488
comm:: recv( exit_po) ;
490
489
log( debug, "test_uv_hl_simple_timer: msg recv on exit_po, done.." ) ;
491
490
}
491
+ #[ test]
492
+ #[ ignore( cfg( target_os = "freebsd" ) ) ]
493
+ fn test_uv_hl_high_level_global_timer ( ) unsafe {
494
+ let hl_loop = get_global_loop ( ) ;
495
+ impl_uv_hl_simple_timer ( hl_loop) ;
496
+ impl_uv_hl_simple_timer ( hl_loop) ;
497
+ }
492
498
}
0 commit comments