Skip navigation.
 
mlRe: Detecting non-responsive app
FROM : John Stiles
DATE : Sat Aug 26 16:12:05 2006

Spin Control can do it, so there must be /some/ way, but it may not be
documented or publicly accessible :|

I think this is a poorly-conceived notion, though. Well-written apps
shouldn't beachball even when they are busy (well, not for long, at
least). And frequently, when you see a beachball, the CPU is already
100% loaded, so it would probably be a bad idea to add /more/ load to
the computer at that point.


Drew McCormack wrote:
>
> On 25/08/2006, at 11:16 PM, Shawn Erickson wrote:
>

>> On 8/25/06, Drew McCormack <<email_removed>> wrote:

>>> Is there any way to determine if the active app is not responding (ie
>>> beachballing) from within a Cocoa app?

>>
>> If it isn't responding (beach balled) that means the main thread isn't
>> processing events from the OS.
>>
>> To detect that you would have to have a second thread watching the
>> main thread in some fashion (for example a timer on the main thread
>> periodically sets a time stamp and this second thread periodically
>> wakes up to see if the time stamp is past some threshold).
>>
>> The main question is what you plan to do in response to this type of
>> issue?
>>
>> -Shawn

>
> Hi Shawn,
>
> You seem to be assuming that I want to know if my app is beach
> balling. I actually want to be able to detect if a different app is.
> Someone else has suggested using a mach port. I had hoped there might
> be a bit of API, but I guess there isn't.
>
> Why do I need this? I have an app that wants to do things in the
> user's 'dead time' (not the computers), and this is one time I thought
> the user could be sitting and waiting. (If you have any other times
> that the user is likely to be waiting, I welcome all suggestions.)
>
> Drew
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list      (<email_removed>)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>

Related mailsAuthorDate
mlDetecting non-responsive app Drew McCormack Aug 25, 22:10
mlRe: Detecting non-responsive app Shawn Erickson Aug 25, 23:16
mlRe: Detecting non-responsive app Drew McCormack Aug 26, 07:54
mlRe: Detecting non-responsive app John Stiles Aug 26, 16:12
mlRe: Detecting non-responsive app Craig Hunter Aug 26, 16:54
mlRe: Detecting non-responsive app Bill Bumgarner Aug 26, 21:33
mlRe: Detecting non-responsive app Drew McCormack Aug 26, 22:20
mlRe: Detecting non-responsive app Drew McCormack Aug 26, 22:25