• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Preventing beach balls
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Preventing beach balls (From: Paul Borokhov <email@hidden>)
 >Re: Preventing beach balls (From: Martin Wennerberg <email@hidden>)
 >Re: Preventing beach balls (From: Paul Borokhov <email@hidden>)
 >Re: Preventing beach balls (From: Sherm Pendley <email@hidden>)
 >Re: Preventing beach balls (From: Paul Borokhov <email@hidden>)

  • Prev by Date: Re: Preventing beach balls
  • Next by Date: Re: Automatic fill in of logins in WebViews?
  • Previous by thread: Re: Preventing beach balls
  • Next by thread: Re: Preventing beach balls
  • Index(es):
    • Date
    • Thread