0

I set a breakpoint in the shutdown hook, and debug it in intellij. But it looks like it has some timeout that it would automatically exit after some time.

AntiTiming
  • 2,094
  • 3
  • 22
  • 33
zjffdu
  • 25,496
  • 45
  • 109
  • 159

1 Answers1

0

In cases of System Shutdown, operating system allows a fixed amount of time for shutdown and exit. In other cases application waits for shutdown-hook to complete like ctrl C , System.exit(status)

It is expected that shutdown-hook to finish their work quickly.

ravthiru
  • 8,878
  • 2
  • 43
  • 52