Re: Preventing beach balls
Re: Preventing beach balls
- Subject: Re: Preventing beach balls
- From: Uli Kusterer <email@hidden>
- Date: Mon, 19 Feb 2007 22:49:28 +0100
Am 19.02.2007 um 22:22 schrieb Paul Borokhov:
Right...looks like rolling this stuff off onto a separate thread
will be easiest (btw, the thing I'm doing is running a loop walking
down the tree of an XML doc...so I think it's easier to just keep
it all in one step rather than breaking it up).
Well, if you e.g. turned your counter variable into an instance
variable (or your "current object" pointer or whatever state you keep
between iterations) and then make every call to -foo do just what is
in one loop iteration.
However, whether you do this or use a thread, you will have to use
some sort of "lock" to keep your tree from changing while you're
between loop iterations. It wouldn't be good if you were e.g.
iterating down a tree while the user deletes a branch above you...
*whaaaaaaaaa!!!*
Cheers,
-- M. Uli Kusterer
http://www.zathras.de
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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