• 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: Main Thread UI and Detached Thread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Main Thread UI and Detached Thread


  • Subject: Re: Main Thread UI and Detached Thread
  • From: Mike <email@hidden>
  • Date: Mon, 31 Mar 2008 12:15:19 -0700

Yes, but in some cases the loop doesn't run for 10,000. It could run for 5 iterations or 100,000 depending on the # if files to delete.

There's no caveat in the docs on the use of performSelectorOnMainThread:withObject:waitUntilDone:modes - the docs make it sound that there are no restrictions on how often or which selectors can be called.

In my case I only call 2 each time through the loop - one method on the main thread to update the progress bar, one to update the message.

-m
=============

Andy Klepack wrote:
Are you calling performSelectorOnMainThread:withObject:waitUntilDone:modes on every iteration of the tight loop? That seems like it could be terribly expensive. What if you throttle it back to every X (ten, hundred, thousand, etc) iterations? My speculation would be you're overwhelming your receiver.

-Andy
_______________________________________________

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

_______________________________________________

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


References: 
 >Main Thread UI and Detached Thread (From: Mike <email@hidden>)
 >RE: Main Thread UI and Detached Thread (From: Andy Klepack <email@hidden>)

  • Prev by Date: Simple NSComboBox example?
  • Next by Date: Re: Main Thread UI and Detached Thread
  • Previous by thread: RE: Main Thread UI and Detached Thread
  • Next by thread: Re: Main Thread UI and Detached Thread
  • Index(es):
    • Date
    • Thread