Open pditommaso opened 5 months ago
As far I understand, the main difference between shutdown
and shutdownNow
is that the later tries to cancel all the currently active tasks. Calling one or the other depends on the semantics we want to give to the close
method. IMO both can be valid.
Yep, tho shutdownNow
can be disruptive because it will try to cancel running tasks. For an orderly shutdown it may be preferable using shutdown()
followed by awaitTermination()
Thanks for creating this project. I was looking at the executor shutdown and I was wondering why it was used
shutdownNow
instead ofshutdown
. Is there a specific reason?https://github.com/albertfc/csv/blob/dc4f4908744341622c0cb2e4b4272b4589801d63/src/main/java/com/seqera/ParallelDataProcessor.java#L22-L22