• 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
Re: Grand Central Dispatch vs CFRunLoop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Grand Central Dispatch vs CFRunLoop


  • Subject: Re: Grand Central Dispatch vs CFRunLoop
  • From: Ken Thomases <email@hidden>
  • Date: Sat, 19 Sep 2009 05:57:54 -0500

On Sep 16, 2009, at 1:47 PM, Chris Kane wrote:

On Sep 13, 2009, at 9:18 PM, Ken Thomases wrote:

With respect to NSTask, there's no reason to believe that it will work if you just run the main dispatch queue rather than running the NSRunLoop. I highly doubt it would.

I think it will work fine as long as you don't want the NSTaskDidTerminateNotification and related (ie, -isRunning to return the right answer) and anything else the NSTask might do as a result of the child process dying.

Well, all that stuff that won't get done is what I meant by it not working. ;) In particular, there have been numerous reports on this list that NSTask fails to clean up various resources if it's launched from a background thread and then that thread is allowed to exit rather than running its run loop until the task completes. I would expect that same sort of leak might occur if you use dispatch_main() rather than running the NSRunLoop.


Cheers,
Ken

_______________________________________________

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


References: 
 >Grand Central Dispatch vs CFRunLoop (From: Filip van der Meeren <email@hidden>)
 >Re: Grand Central Dispatch vs CFRunLoop (From: Ken Thomases <email@hidden>)
 >Re: Grand Central Dispatch vs CFRunLoop (From: Chris Kane <email@hidden>)

  • Prev by Date: Re: NSNotificationQueue : NSPostingStyle : Definitions for Dummies
  • Next by Date: Re: 2 simple questions
  • Previous by thread: Re: Grand Central Dispatch vs CFRunLoop
  • Next by thread: Bug: CalendarStore framework adding events with alarms with email address.
  • Index(es):
    • Date
    • Thread