How to kill all the threads which they are not the main thread? How to kill all the threads which they are not the main thread? multithreading multithreading

How to kill all the threads which they are not the main thread?


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.