]> git.saurik.com Git - apple/libdispatch.git/commitdiff
libdispatch-339.92.1.tar.gz os-x-1093 os-x-1094 os-x-1095 v339.92.1
authorApple <opensource@apple.com>
Tue, 12 Aug 2014 18:11:46 +0000 (18:11 +0000)
committerApple <opensource@apple.com>
Tue, 12 Aug 2014 18:11:46 +0000 (18:11 +0000)
src/introspection.c
src/trace.h

index d1dd04db590e8cac66f0db4f07d7dad55ea387a3..18c11df07010dc6184568a9a5214a1e38907e9fd 100644 (file)
@@ -252,7 +252,7 @@ _dispatch_introspection_source_get_info(dispatch_source_t ds)
        dispatch_function_t handler = dr->ds_handler_func;
        bool handler_is_block = ds->ds_handler_is_block;
        bool after = (handler == _dispatch_after_timer_callback);
        dispatch_function_t handler = dr->ds_handler_func;
        bool handler_is_block = ds->ds_handler_is_block;
        bool after = (handler == _dispatch_after_timer_callback);
-       if (after) {
+       if (after && !(ds->ds_atomic_flags & DSF_CANCELED)) {
                dispatch_continuation_t dc = ctxt;
                ctxt = dc->dc_ctxt;
                handler = dc->dc_func;
                dispatch_continuation_t dc = ctxt;
                ctxt = dc->dc_ctxt;
                handler = dc->dc_func;
index 9a0f1528931287a9e42bde8d02cb12b580afb857..d6b31feb31555d576c9d7cdb4de122fa37d9a83f 100644 (file)
@@ -190,7 +190,8 @@ static inline dispatch_function_t
 _dispatch_trace_timer_function(dispatch_source_t ds, dispatch_source_refs_t dr)
 {
        dispatch_function_t func = dr->ds_handler_func;
 _dispatch_trace_timer_function(dispatch_source_t ds, dispatch_source_refs_t dr)
 {
        dispatch_function_t func = dr->ds_handler_func;
-       if (func == _dispatch_after_timer_callback) {
+       if (func == _dispatch_after_timer_callback &&
+                               !(ds->ds_atomic_flags & DSF_CANCELED)) {
                dispatch_continuation_t dc = ds->do_ctxt;
                func = dc->dc_func != _dispatch_call_block_and_release ? dc->dc_func :
                                dc->dc_ctxt ? _dispatch_Block_invoke(dc->dc_ctxt) : NULL;
                dispatch_continuation_t dc = ds->do_ctxt;
                func = dc->dc_func != _dispatch_call_block_and_release ? dc->dc_func :
                                dc->dc_ctxt ? _dispatch_Block_invoke(dc->dc_ctxt) : NULL;