• 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
waiting for an NSThread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

waiting for an NSThread


  • Subject: waiting for an NSThread
  • From: John Zorko <email@hidden>
  • Date: Sun, 12 Oct 2008 20:42:16 -0700


Hello, all ...

I've another n00b Cocoa question: How can I wait for a thread to finish without depending on a flag that may be reset and set before the thread i'm waiting for has time to check it? For instance, in Win32 (i'm not saying Win32 is the best, it's just what i've the most experience in), I can ::WaitForSingleObject(thread_id). In Cocoa, once I start the new thread via NSThread detachNewThreadSelector(), how can I be sure it ended i.e. how can I wait for it to end before starting another? Can I have Cocoa notify me when a thread ends, like it notifies me when an observed property changes?

Regards,

John

Falling You - exploring the beauty of voice and sound
http://www.fallingyou.com











_______________________________________________

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: waiting for an NSThread
      • From: Benjamin Stiglitz <email@hidden>
    • Re: waiting for an NSThread
      • From: Omar Qazi <email@hidden>
    • Re: waiting for an NSThread
      • From: Roland King <email@hidden>
  • Prev by Date: Re: creating a printer
  • Next by Date: Re: waiting for an NSThread
  • Previous by thread: [Moderator] Re: iPhone: Editing with cursor but without keyboard
  • Next by thread: Re: waiting for an NSThread
  • Index(es):
    • Date
    • Thread