// guarantee the in-order processing.
new Thread(new GetLocationsList(directTask, dataManager)).start();
// then download all chunks in separate threads
for (MetaChunk chunk : task.getOpenChunks()) {
DownloadChunkRunnableDirect runnable = new DownloadChunkRunnableDirect(directTask, chunk, messageManager,
keyManager, fileConfig);
executor.submit(runnable);
}
} else {
// submit each chunk as a separate thread