Question about looping constructs
Question about looping constructs
- Subject: Question about looping constructs
- From: BJ Homer <email@hidden>
- Date: Tue, 5 Jan 2010 16:24:29 -0700
<< Branching from the "Question about garbage collection" thread >>
On Sun, Jan 3, 2010 at 11:40 AM, Bill Bumgarner <email@hidden> wrote:
>
> If you are writing your own looping construct, you can call
> objc_clear_stack(...) to clear the stack at appropriate times, typically
> when the stack is as shallow as possible. Prior to Snow Leopard, writing
> your own looping construct was relatively rare in Cocoa. With Snow
> Leopard's addition of Grand Central Dispatch, writing your own looping
> construct is actively discouraged (though, certainly, there are still
> reasons to do so).
>
> b.bum
I assume that when you say "looping construct", you're not referring to
things like for, while, do-while, etc. Could you explain what you're talking
about? I'm guessing you mean run loops on detached threads, and if so, are
you referring to using custom input sources for threads? I've seen a fair
amount of code that detaches a thread to a method with a while(!done) { //
code here } structure. Is there a better way?
_______________________________________________
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