Skip to content

Commit

Permalink
parallelizer()
Browse files Browse the repository at this point in the history
  • Loading branch information
fluentfuture committed Nov 30, 2024
1 parent d80fb13 commit 04693bb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions mug/src/main/java/com/google/mu/util/concurrent/Fanout.java
Original file line number Diff line number Diff line change
Expand Up @@ -448,11 +448,15 @@ Scope add(Runnable... tasks) {
}

void run() throws InterruptedException {
new Parallelizer(executor, runnables.size()).parallelize(runnables.stream());
parallelizer().parallelize(runnables.stream());
}

void runUninterruptibly() {
new Parallelizer(executor, runnables.size()).parallelizeUninterruptibly(runnables.stream());
parallelizer().parallelizeUninterruptibly(runnables.stream());
}

private Parallelizer parallelizer() {
return new Parallelizer(executor, runnables.size());
}
}

Expand Down

0 comments on commit 04693bb

Please # to comment.