Skip to content

Commit

Permalink
rt/std: update of libuv API glue for libuv submodule update
Browse files Browse the repository at this point in the history
  • Loading branch information
olsonjeffery authored and Kerra Olson committed Feb 10, 2013
1 parent 3a813e2 commit dfcdb6e
Show file tree
Hide file tree
Showing 4 changed files with 111 additions and 132 deletions.
14 changes: 9 additions & 5 deletions src/libstd/uv_iotask.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,15 +185,19 @@ fn begin_teardown(data: *IoTaskLoopData) {
ll::close(async_handle as *c_void, tear_down_close_cb);
}
}
extern fn tear_down_walk_cb(handle: *libc::c_void, arg: *libc::c_void) {
log(debug, ~"IN TEARDOWN WALK CB BOYEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE");
// pretty much, if we still have an active handle and it is *not*
// the async handle that facilities global loop communication, we
// want to barf out and fail
assert handle == arg;
}

extern fn tear_down_close_cb(handle: *ll::uv_async_t) {
unsafe {
let loop_ptr = ll::get_loop_for_uv_handle(handle);
let loop_refs = ll::loop_refcount(loop_ptr);
log(debug,
fmt!("tear_down_close_cb called, closing handle at %? refs %?",
handle, loop_refs));
assert loop_refs == 1i32;
log(debug, ~"in tear_down_close_cb");
ll::walk(loop_ptr, tear_down_walk_cb, handle as *libc::c_void);
}
}

Expand Down
Loading

0 comments on commit dfcdb6e

Please sign in to comment.