I do many asynchronous execution with blocks in my application.
But I need to kill all the threads which they are not the main thread if a certain event appears in my application.
So is it possible to stop the execution of all blocks ? Or in other terms, kill all the threads which they are not the main thread ?
PS : I tried to execute blocks inside NSOperationQueue, but my first operation does not start at the good time while the followings does.
If you need to kill threads to cancel operations, you’re probably doing it wrong. NSOperationQueue
or similar solution (like implementing cancellation logic in your blocks) is IMHO the right way to go. If you have some problems with the operation queue, try to sort it out, don’t avoid the problem by creating a worse one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With