开发者

Raise an exception on another thread in iOS/Objective-C?

开发者_开发问答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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜