• 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: How to Delay, Wait, Pause...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to Delay, Wait, Pause...


  • Subject: Re: How to Delay, Wait, Pause...
  • From: Michael Vannorsdel <email@hidden>
  • Date: Sun, 25 May 2008 04:00:08 -0600

This is an important consideration. If you're relying on a specific event to finish within a finite amount of time, you're going to have a race condition where the event could finish later than expected and you may end up in an invalid state.

Perhaps if you told us what it is you're specifically doing we could offer better, more reliable solutions.


On May 25, 2008, at 3:40 AM, Thomas Davie wrote:

I hate to say this, but any form of delay here is the *wrong* way to do this. You already know you have a race condition, all you're doing is making it so the race condition will work out in your favor 99.99% of the time. There are still exceptional cases where the OS will be busy doing something and your 0.1 second sleep will not be enough to sort it out. Instead of doing this, do your threading properly, and get your locking right.

_______________________________________________

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: 
 >Re: How to Delay, Wait, Pause... (From: Steve Steinitz <email@hidden>)
 >Re: How to Delay, Wait, Pause... (From: Thomas Davie <email@hidden>)

  • Prev by Date: Problem configuring NSToolbarItem in IB
  • Next by Date: Re: File's Owner
  • Previous by thread: Re: How to Delay, Wait, Pause...
  • Next by thread: Re: How to Delay, Wait, Pause...
  • Index(es):
    • Date
    • Thread