File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -40,12 +40,12 @@ pub unsafe fn weaken_task(f: &fn(Port<ShutdownMsg>)) {
40
40
let task = get_task_id ( ) ;
41
41
// Expect the weak task service to be alive
42
42
assert service. try_send ( RegisterWeakTask ( task, shutdown_chan) ) ;
43
- unsafe { rust_inc_kernel_live_count ( ) ; }
43
+ unsafe { rust_dec_kernel_live_count ( ) ; }
44
44
do fn& ( ) {
45
45
let shutdown_port = swap_unwrap ( & mut * shutdown_port) ;
46
46
f ( shutdown_port)
47
47
} . finally || {
48
- unsafe { rust_dec_kernel_live_count ( ) ; }
48
+ unsafe { rust_inc_kernel_live_count ( ) ; }
49
49
// Service my have already exited
50
50
service. send ( UnregisterWeakTask ( task) ) ;
51
51
}
@@ -78,11 +78,11 @@ fn create_global_service() -> ~WeakTaskService {
78
78
let port = swap_unwrap ( & mut * port) ;
79
79
// The weak task service is itself a weak task
80
80
debug ! ( "weakening the weak service task" ) ;
81
- unsafe { rust_inc_kernel_live_count ( ) ; }
81
+ unsafe { rust_dec_kernel_live_count ( ) ; }
82
82
run_weak_task_service ( port) ;
83
83
} . finally {
84
84
debug ! ( "unweakening the weak service task" ) ;
85
- unsafe { rust_dec_kernel_live_count ( ) ; }
85
+ unsafe { rust_inc_kernel_live_count ( ) ; }
86
86
}
87
87
}
88
88
You can’t perform that action at this time.
0 commit comments