Skip navigation.
 
mlRe: Main Thread UI and Detached Thread
FROM : Mike
DATE : Mon Mar 31 21:15:19 2008

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_removed>)
>
> 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/andy.<email_removed>
>
> This email sent to andy.<email_removed>
>

Related mailsAuthorDate
mlMain Thread UI and Detached Thread Mike Mar 30, 20:55
mlRe: Main Thread UI and Detached Thread j o a r Mar 31, 18:36
mlRe: Main Thread UI and Detached Thread Hank Heijink (Mail… Mar 31, 18:48
mlRe: Main Thread UI and Detached Thread Mike Mar 31, 20:02
mlRe: Main Thread UI and Detached Thread Mike Mar 31, 20:06
mlRE: Main Thread UI and Detached Thread Andy Klepack Mar 31, 20:10
mlRe: Main Thread UI and Detached Thread j o a r Mar 31, 20:11
mlRe: Main Thread UI and Detached Thread Hank Heijink (Mail… Mar 31, 20:26
mlRe: Main Thread UI and Detached Thread Matt Mashyna Mar 31, 20:30
mlRe: Main Thread UI and Detached Thread Mike Mar 31, 21:15
mlRe: Main Thread UI and Detached Thread Mike Mar 31, 21:20
mlRe: Main Thread UI and Detached Thread Mike Mar 31, 21:25
mlRe: Main Thread UI and Detached Thread Mike Mar 31, 21:28
mlRe: Main Thread UI and Detached Thread j o a r Mar 31, 21:47
mlRe: Main Thread UI and Detached Thread j o a r Mar 31, 22:02
mlRe: Main Thread UI and Detached Thread Ken Victor Mar 31, 22:23
mlRe: Main Thread UI and Detached Thread Mike Apr 4, 09:06
mlRe: Main Thread UI and Detached Thread Mike Apr 4, 09:08
mlRe: Main Thread UI and Detached Thread j o a r Apr 4, 09:24
mlRe: Main Thread UI and Detached Thread Scott Ribe Apr 4, 16:12
mlRe: Main Thread UI and Detached Thread Shawn Erickson Apr 4, 22:29