Note that Timer creates a non-daemon thread to fire the tasks in the background, however, so in Listing 10 I have to kill the VM via a call to System.exit().
请注意Timer却创建了一个非守护线程在后台启动任务,因此在清单10 中我需要调用 System.exit() 来取消任务。
Note that Timer creates a non-daemon thread to fire the tasks in the background, however, so in Listing 10 I have to kill the VM via a call to System.exit().
请注意Timer却创建了一个非守护线程在后台启动任务,因此在清单10 中我需要调用 System.exit() 来取消任务。
应用推荐