Occasional InterruptedException when quitting a Swing application

前端 未结 17 1126
心在旅途
心在旅途 2020-12-05 04:55

I recently updated my computer to a more powerful one, with a quad-core hyperthreading processor (i7), thus plenty of real concurrency available. Now I\'m occasionally

17条回答
  •  独厮守ぢ
    2020-12-05 05:37

    If you were using the Swing App Framework, you could override Application.exit() to perform cleanup, or add an ExitListener as well. Otherwise, you could also add a shutdown hook, Runtime.getRuntime().addShutdownHook() to your app.

提交回复
热议问题