Re: NSApp with wrong _running count
Re: NSApp with wrong _running count
- Subject: Re: NSApp with wrong _running count
- From: Andrew Farmer <email@hidden>
- Date: Tue, 20 May 2008 15:40:11 -0700
On 20 May 08, at 11:10, Michael Vannorsdel wrote:
When you mention running count, are you keeping an int or something
to keep track of thread progress? If so remember to use atomic
operations to update the count from multiple threads to prevent data
corruption. As for NSAlert, a general rule is not to interact with
the UI from any threads other than the main. Use
performSelectorOnMainThread: to forward messages to the main thread.
The "_running count" looks like an internal detail of the AppKit
runtime that's getting perturbed by running an alert on a non-main
thread.
_______________________________________________
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