Skip to content

Commit dfcdb6e

Browse files
olsonjefferyKerra Olson
authored andcommitted
rt/std: update of libuv API glue for libuv submodule update
1 parent 3a813e2 commit dfcdb6e

File tree

4 files changed

+111
-132
lines changed

4 files changed

+111
-132
lines changed

src/libstd/uv_iotask.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,15 +185,19 @@ fn begin_teardown(data: *IoTaskLoopData) {
185185
ll::close(async_handle as *c_void, tear_down_close_cb);
186186
}
187187
}
188+
extern fn tear_down_walk_cb(handle: *libc::c_void, arg: *libc::c_void) {
189+
log(debug, ~"IN TEARDOWN WALK CB BOYEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE");
190+
// pretty much, if we still have an active handle and it is *not*
191+
// the async handle that facilities global loop communication, we
192+
// want to barf out and fail
193+
assert handle == arg;
194+
}
188195

189196
extern fn tear_down_close_cb(handle: *ll::uv_async_t) {
190197
unsafe {
191198
let loop_ptr = ll::get_loop_for_uv_handle(handle);
192-
let loop_refs = ll::loop_refcount(loop_ptr);
193-
log(debug,
194-
fmt!("tear_down_close_cb called, closing handle at %? refs %?",
195-
handle, loop_refs));
196-
assert loop_refs == 1i32;
199+
log(debug, ~"in tear_down_close_cb");
200+
ll::walk(loop_ptr, tear_down_walk_cb, handle as *libc::c_void);
197201
}
198202
}
199203

0 commit comments

Comments
 (0)