开发者_开发问答Is there a way to raise an exception on another thread in iOS/Objective-C?
What I am trying to do is create something like Java's Thread.interrupt() and InterruptedException do (see Java API) ? This exception is raised on a thread when someone calls the thread's interrupt method, thus allowing another thread to signal a proposed termination.
Is -[NSThread cancel]
what you're looking for? It doesn't raise an exception, but it allows another thread to signal a proposed termination.
精彩评论