Executor.execute() hangs definitely

后端 未结 1 875
不知归路
不知归路 2021-01-16 20:54

Im doing nashorn lately and so went to read about the java.util.concurrent.

Ive an issue where i can run simple executors like :

Executors.newFixedTh         


        
相关标签:
1条回答
  • 2021-01-16 21:23

    Those executors are spawning non-daemon threads which are preventing the JVM from exiting.

    Try shutting down the executors when you are done with them using:

    executor.shutdown();
    
    0 讨论(0)
提交回复
热议问题