On Sat, Feb 21, 2009 at 12:27 PM, Shawn Erickson <[email protected]> wrote:
> On Fri, Feb 20, 2009 at 6:50 PM, Michael Vannorsdel <[email protected]> 
> wrote:
>> It should be more like:
>>
>>        //create timer
>>        //add timer to runloop
>>
>>        CFRunLoopRun(); //code blocks here (not really since the loop is
>> running) until runloop exits due to no longer having observers or timers
>>
>>        //do thread cleanup and exit
>
> Note framework code could add sources to the runloop outside of your
> direct control. This can make depending on the runloop exiting when
> you remove your sources problematic.

Exactly right. When the docs talk about how a runloop will exit when
it has no sources, think of it as a threat, not a promise. It's
behavior you have to guard against, but it's not something you can
count on.

Mike
_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to