Add support for applications which immediately exit
See original GitHub issueSometimes an application doesn’t have any persistent services. Such applications should auto-exit after everything was “started”.
A good way to implement this might be for main-method startup build steps to indicate symbolically if they are persistent. Only a handful will be:
- Fixed thread pools like the scheduler
- I/O event loop threads
Notably, regular thread pools should not be considered persistent.
If no persistent services are started, then the shutdownRequested
flag should be immediately set, which will cause the main thread to exit cleanly (with no exit code). The shutdown hook will then run, but as the application was already stopped, it will immediately exit with no action taken.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:25
- Comments:41 (26 by maintainers)
Top Results From Across the Web
Application.Exit Method (System.Windows.Forms)
Exit (). Informs all message pumps that they must terminate, and then closes all application windows after the messages have been processed.
Read more >How to force an app to quit on your Mac - Apple Support (NG)
Select the app that you want to quit, then click Force Quit. Force Quit Applications window. You can even force the Finder to...
Read more >How to Create Exit Handlers for Your Python App
Run your Python file and the function will be executed when your application quits. If you registered the same function twice, it will...
Read more >Re: How to exit your applications for AIR for iOS ... - Adobe Support ...
Within the event handler for the click button, surely I won't be typing the entire iPhone tag XML and add in <key>UIApplicationExitsOnSuspend</key><true/> ...
Read more >force the close application - eehelp.com
Do not call System.exit (0) directly in your application. Implement a method that makes all cleaning operations and calls System.exit (0) after all....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Being able to easily create Quarkus CLIs might be a good way of keeping people for using Go for such tools
I’m almost finished with my current task, and this one will be next.