So far I have gone through the doc of GCD, however it seems there misses dispatch_cancel() which I want to use it to cancel all dispatch\'s blocks invocation. Is there any w
from iOS 8 and higher you can cancel block execution with
dispatch_block_cancel
dispatch_block_t blockTask = dispatch_block_create(0,{
//do some task
});
dispatch_time_t time = dispatch_time(DISPATCH_TIME_NOW,5*NSEC_PER_SEC);
dispatch_after(time,dispatch_get_main_queue(),blockTask);
dispatch_block_cancel(blockTask);