diff options
| author | Jeff Olson <olson.jeffery@gmail.com> | 2012-04-19 05:59:37 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-04-20 15:23:23 -0700 |
| commit | e02057c5a58bd5498c59bbe769bfd327721f4c8d (patch) | |
| tree | f618c8a835079f36aa0802bf15020b1145cfeae2 /src/libstd | |
| parent | a9db0c9efe75e6adc180d1f167326e072b82792c (diff) | |
| download | rust-e02057c5a58bd5498c59bbe769bfd327721f4c8d.tar.gz rust-e02057c5a58bd5498c59bbe769bfd327721f4c8d.zip | |
std: fail if exiting hl_loop has unref_handles at weaken_task exit
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/uv_hl.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libstd/uv_hl.rs b/src/libstd/uv_hl.rs index 7eaf52ad96f..48d37753208 100644 --- a/src/libstd/uv_hl.rs +++ b/src/libstd/uv_hl.rs @@ -269,9 +269,10 @@ crust fn high_level_wake_up_cb(async_handle: *ll::uv_async_t, crust fn tear_down_close_cb(handle: *ll::uv_async_t) unsafe { log(debug, #fmt("tear_down_close_cb called, closing handle at %?", handle)); - // TODO: iterate through open handles on the loop and uv_close() - // them all - //let data = ll::get_data_for_uv_handle(handle) as *global_loop_data; + let data = ll::get_data_for_uv_handle(handle) as *global_loop_data; + if vec::len((*data).refd_handles) > 0 { + fail "Didn't unref all high-level handles"; + } } fn high_level_tear_down(data: *global_loop_data) unsafe { |
