executor.submit(runnable);
}
} else {
// submit each chunk as a separate thread
for (MetaChunk chunk : task.getOpenChunks()) {
DownloadChunkRunnableDHT runnable = new DownloadChunkRunnableDHT((DownloadTaskDHT) task, chunk, dataManager);
executor.submit(runnable);
}
}
}