Java Executors: how can I stop submitted tasks?

后端 未结 5 932
抹茶落季
抹茶落季 2020-12-01 12:48

I have submitted a task using executors and I need it to stop after some time (e.g. 5 minutes). I have tried doing like this:

   for (Future fut : e         


        
5条回答
提交回复
热议问题