Re: How to Delay, Wait, Pause...
Re: How to Delay, Wait, Pause...
- Subject: Re: How to Delay, Wait, Pause...
- From: Thomas Davie <email@hidden>
- Date: Sun, 25 May 2008 11:40:17 +0200
On 25 May 2008, at 11:22, Steve Steinitz wrote:
Hello,
Thank you Jens Alfke, Peter Burtis and Stephen Joseph Butler for
your excellent, quick and helpful replies.
[SNIP]
from your method. Stephen warns that the host method needs to be re-
entrant or guard against multiple entries.
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.
Bob
_______________________________________________
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