String (@NotNull WSLDistribution distribution) { Future<String> future = myWslExecutor.submit(() -> checkWslDistribution(distribution)); try { return future.get(WSL_DETECTION_TIMEOUT_MS, TimeUnit.MILLISECONDS); } catch (InterruptedException | ExecutionException | TimeoutException e) { LOG.warn(String.format("WSL executable detection aborted for %s", distribution), e); future.cancel(true); return null; } }