discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [NSWorkspace launchedApplications] issue


From: Lars Sonchocky-Helldorf
Subject: Re: [NSWorkspace launchedApplications] issue
Date: Fri, 3 Aug 2007 23:29:40 +0200


Am 03.08.2007 um 09:55 schrieb Richard Frith-Macdonald:


On 3 Aug 2007, at 08:18, Richard Frith-Macdonald wrote:


On 3 Aug 2007, at 07:49, Riccardo wrote:

Hi,

On 2007-08-03 08:18:10 +0200 Richard Frith-Macdonald <richard@tiptree.demon.co.uk> wrote:

2. check that the apps are still responding if it's more than 30 seconds since the last time launchedApplications was called. I'm not sure that (2) is a good idea though ... the check has the potential to be very slow and can potentially remove an app from the list when it's only temporarily not responding, rather than permanently hung. Thoughts?


What means responding?

Slow (over 5 seconds) to respond...

Some apps might be "busy" for quite some time. FTP release (0.1, not current CVS) is not threaded, thus when it downloads a file usually gnustep doesn't update the window at all (and also can cause focus problems... this is very nasty). Would a download of over 30seconds make it mark as crashed?

Only if you called the launchedApplications method during that 30 second delay.

Current FTP uses NSTask so it shouldn't happen, if at all. But it is just an example...

Yes ... that's why I worry about doing the check ... in general apps should be written to avoid such delays (easily done using asynchronous I/O, or threads, or subtasks for slow operations) but some may not, and there are always cases where an operation can take an unanticipatedly long time.

Of course, when an app becomes active again after being inactive, it will put itsself back in the list of launched apps, so it's not that big a deal if we remove it while it's not responding, but I wonder if we actually *want* the list to contain hung/slow apps. Perhaps we do.

I tested this on MacOS-X ... it reports hung applications in the launchedApplications list ... so I reverted the code to match the MacOS-X behavior.

But there those hung / no responding apps are marked (red text and a text label) in the interfaces. Obviously those Apps don't rely on [NSWorkspace launchedApplications] but on (Carbon) Process Manager Functions or something similar. Btw. there was a discussion on that topic on cocoa-dev quite a while ago:

http://lists.apple.com/archives/Cocoa-dev/2006/Mar/msg01858.html

And then there is NDProcess a wrapper for Process Manager:

http://homepage.mac.com/nathan_day/pages/source.xml

maybe something similar can be created for GNUstep.


regards,

        Lars





_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnustep





reply via email to

[Prev in Thread] Current Thread [Next in Thread]