Skip to content

Commit 940edbc

Browse files
olsonjefferyKerra Olson
authored andcommitted
---
yaml --- r: 44354 b: refs/heads/master c: dfcdb6e h: refs/heads/master v: v3
1 parent 6a01fc6 commit 940edbc

File tree

5 files changed

+112
-133
lines changed

5 files changed

+112
-133
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 3a813e29b64dac9502f16b8cbaae6a6d16f9a687
2+
refs/heads/master: dfcdb6eb729fa51cac47f219a90a9f894819f343
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d9689399d091c3265f00434a69c551a61c28dc
55
refs/heads/try: ef355f6332f83371e4acf04fc4eb940ab41d78d3

trunk/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)