My code:
String[] torrentFiles = new File(\"/root/torrents/\").list();
if(torrentFiles.length == 0 || torrentFiles == null)
{
S
ExecutorService.shutdownNow() will try to stop all the executing threads..
Here is a quote from javadoc
ListshutdownNow() Attempts to stop all actively executing tasks, halts the processing of waiting tasks, and returns a list of the tasks that were awaiting execution.
There are no guarantees beyond best-effort attempts to stop processing actively executing tasks. For example, typical implementations will cancel via Thread.interrupt(), so if any tasks mask or fail to respond to interrupts, they may never terminate.