Re: Main Thread UI and Detached Thread
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