How to pair life of thread to main program thread

时间:2019-01-15 18:23:01

标签: java

Seem that threads I run of the main program thread don't terminate when main thread run its life and program terminates.

Is there a way to pair the life of the sub thread to the main thread, such that the sub thread behaves as a child thread and dies with the parent?

0 个答案:

没有答案