• 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: NSTask - Notification and Threads
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTask - Notification and Threads


  • Subject: Re: NSTask - Notification and Threads
  • From: Seth Willits <email@hidden>
  • Date: Thu, 5 Mar 2009 22:52:27 -0800

On Mar 5, 2009, at 2:45 PM, Ken Thomases wrote:

Yeah. You can provide feedback for the documentation to ask for clarification.

Done. :-)


So, it's not even sufficient that the launch thread continues to exist, it must run its run loop.

Good point.


By the way, you don't necessarily need to use a condition lock to learn when the task has been launched. If you have the secondary thread tell the main thread to launch the task using - performSelectorOnMainThread:withObject:waitUntilDone: and pass YES for the wait parameter, you get that synchronization pretty simply.

Yes, you're right. Though since I've been bitten by the waitUntilDone:YES behavior before (entirely my fault), I was trying to think of a new way to avoid it and still achieve a similar result.




Alrighty, thanks Ken. Just looking to see that I had my head on straight. Looks like I did. :)


Cheerio,

--
Seth Willits



_______________________________________________

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: 
 >NSTask - Notification and Threads (From: Seth Willits <email@hidden>)
 >Re: NSTask - Notification and Threads (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: More user agent questions
  • Next by Date: Re: Thread usage : Main thread interrupting secondary thread
  • Previous by thread: Re: NSTask - Notification and Threads
  • Next by thread: launching per-user background agent 10.5 and higher
  • Index(es):
    • Date
    • Thread