Once I start a queue it takes almost 3-4 minutes, In case I want to stop this queue on a button(cancel button) click then can I do so?? If yes then how ?
dispatch_sync(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
@synchronized(self)
{
for (int i = 0; i < (4000); i++) {
(Some methods)
}
}
});
Can I stop or dismiss this thread?