}
// Loop until all images are downloaded or timeout is reached
long totalTimeout = DOWNLOAD_TIMEOUT + DOWNLOAD_TIMEOUT_ONE_TILE * tiles.size();
log.debug("=== total timeout (millis): {}", totalTimeout);
ExecutorService service = Executors.newFixedThreadPool(DOWNLOAD_MAX_THREADS);
List<Future<ImageResult>> futures = service.invokeAll(callables, totalTimeout, TimeUnit.MILLISECONDS);
// determine the pixel bounds of the mosaic
Bbox pixelBounds = getPixelBounds(tiles);
// create the images for the mosaic
List<RenderedImage> images = new ArrayList<RenderedImage>();
for (Future<ImageResult> future : futures) {