Re:Lion Is a Quitter
by thegreatcurve on Tuesday August 09, 2011 @07:08PM
(#2865908)
Behaviour #2 has resource management benefits too. App-less processes will be terminated when available memory gets low.
Re:Lion Is a Quitter
by thought_alarm on Tuesday August 09, 2011 @07:14PM
(#2865925)
Resource management is already covered by #1. #2 is strictly a UI convention.
#2: Any headless process that's scanning, or performing a behind-the-scenes operation. And note, it's window not application. Because an application could reliably stay open without a window… until now.
Mail. File Transfers. Staying available for chat. Rendering process that can run headless. (Handbrake, I think, plus others.)
Re:Lion Is a Quitter
by thought_alarm on Tuesday August 09, 2011 @07:14PM
(#2865920)
Applications that appear to quit are essentially suspended; they consume RAM but not CPU and cannot do work in the background.
If an application needs to do work in the background then it is not subject to automatic termination by either behavior #1 or behavior #2 and simply remains running.
You’re very correct on everything. However, what about anything that is largely async? Background daemons?
This is interesting to me because I've become obsessed with the idea of running a 10W, ARM-based system headless, that serves webpages (i.e. HTTP) with the requested data via my LAN. You can leave something like that on all the time, and have instant-on for your higher power devices with displays and such.
Remember that an application has to support the sudden termination API, and indicate to the OS that it can be safely shutdown, in order to actually have this condition apply.
http://developer.apple.com/library/mac/#documentation/Cocoa/...
If you make no changes to your application, then the OS won't touch it. And if you do decide to support sudden termination, then hopefully you would call disableSuddenTermination before starting any background file transfers, renderings, etc.
Re:Lion Is a Quitter
by ridiculous_fish on Tuesday August 09, 2011 @09:00PM
(#2866249)
Behavior 2 allows apps to appear to relaunch more quickly (since they were never exited).
1. Application without a process: if an application has one or more open documents but no documents visible on screen, the app may terminate itself when resources are low. The applications still appears to be alive in the dock and command+tab menu, but its process has been terminated and is no longer consuming resources. When you command+tab back to the application it restarts itself and restores its previous state.
2. Process without an application: if an application has no open documents it will appear to quit automatically and is removed from the Dock and command+tab menu. In actuality, it remains running in the background ready to spring into action again.
The question is, why support behavior #2 at all?
Behavior #1 covers the automatic resource management and I think it works well (and unlike iOS, Mac applications can opt-out of this behavior). Behavior #2 seems to be aimed at Windows users who have no concept of "Quit", but it only aggravates long-time Mac users with zero actual benefit with respect to resource management. It has nothing to do with iOS and everything to do with grandma Windows users who just bought their first MacBook.