• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Exiting non-POSIX threads?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Exiting non-POSIX threads?
      • From: Steve Sisak <email@hidden>
  • Prev by Date: Re: UIScrollView to UIImage
  • Next by Date: Re: Exiting non-POSIX threads?
  • Previous by thread: Printing Problem
  • Next by thread: Re: Exiting non-POSIX threads?
  • Index(es):
    • Date
    • Thread