Re: Why RunLoop?
Re: Why RunLoop?
- Subject: Re: Why RunLoop?
- From: David Duncan <email@hidden>
- Date: Tue, 17 May 2011 09:59:53 -0700
On May 17, 2011, at 9:54 AM, Bing Li wrote:
> Dear Bill,
>
> You are right. Polling is not good.
>
> But I noticed that Cocoa threading provides wait/pulse-like synchronization
> techniques, such as Condition. I believe these techniques can be used to
> control a thread which has a while-true loop. So I think RunLoop can be
> replaced. Do you think so?
Just because a facility is provided (Condition locks) for does not mean that it can be used to replace another facility (Run Loops). Run Loops do and provide more than what you can do with the techniques you mention, including things that you cannot easily (if at all) replicate.
--
David Duncan
_______________________________________________
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