question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for applications which immediately exit

See original GitHub issue

Sometimes 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:closed
  • Created 5 years ago
  • Reactions:25
  • Comments:41 (26 by maintainers)

github_iconTop GitHub Comments

26reactions
geoandcommented, Mar 27, 2019

Being able to easily create Quarkus CLIs might be a good way of keeping people for using Go for such tools

4reactions
dmlloydcommented, Oct 30, 2019

I’m almost finished with my current task, and this one will be next.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found