On Mar 30, 2008, at 11:55 AM, Mike wrote:
In my worker thread I do a tight processing loop and one of the things I do in the loop is call two methods in the main thread to update the display (a text message and progress bar) - via performSelectorOnMainThread:withObject:waitUntilDone:modes.

However, when the loop runs in the spawned thread, the display doesn't get updated. If I insert a sleep(1) call into the loop, then the display updates.


How much work do you perform on the main thread? If a lot, it's not unexpected that you would se interruptions in display updates. You might need to throttle or otherwise limit your callouts to the main thread if this proves to be the problem.

You can use Instruments or Shark to get a view of the work being performed on the main thread while you run your worker thread.

j o a r


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to