Skip to content

Commit

Permalink
fix: revert change from #2447
Browse files Browse the repository at this point in the history
  • Loading branch information
sdhuka committed Feb 18, 2022
1 parent 5345636 commit 417366a
Showing 1 changed file with 4 additions and 5 deletions.
Expand Up @@ -26,23 +26,22 @@
import com.amazonaws.logging.LogFactory;

class TransferThreadPool {

private static final Log LOGGER = LogFactory.getLog(TransferService.class);

private static ExecutorService executorMainTask;
private static ExecutorService executorPartTask;

static synchronized void init(final int transferThreadPoolSize) {
LOGGER.debug("Initializing the thread pool of size: " + transferThreadPoolSize);

final int poolSize = Math.max((int) (Math.ceil((double) transferThreadPoolSize / 2)), 1);

if (executorMainTask == null) {
executorMainTask = buildExecutor(poolSize);
}
if (executorPartTask == null) {
// Upload individual parts serially
executorPartTask = buildExecutor(1);
executorPartTask = buildExecutor(poolSize);
}
}

Expand Down

0 comments on commit 417366a

Please sign in to comment.