Exiting non-POSIX threads?
Exiting non-POSIX threads?
- Subject: Exiting non-POSIX threads?
- From: Oleg Krupnov <email@hidden>
- Date: Mon, 29 Jul 2013 11:34:09 +0300
I'm writing an exception handler where I want to terminate a crashed
thread without terminating the entire process. Before GCD I used the
following code:
if ([NSThread currentThread] != [NSThread mainThread])
{
[NSThread exit];
}
However for GCD thread (created with dispatch_async()) I get the
following signal:
pthread_exit() may only be called against threads created via pthread_create()
Is there a way to handle this case?
Is there a way to exit a GCD thread?
At least, is there a way of telling POSIX threads from GCD / other threads?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden