Re: Detecting non-responsive app
Re: Detecting non-responsive app
- Subject: Re: Detecting non-responsive app
- From: John Stiles <email@hidden>
- Date: Sat, 26 Aug 2006 07:12:05 -0700
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@hidden> 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@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden