@Test void shouldActuallyRunInParallel() throws InterruptedException { int parallel = 2; CountDownLatch countDownLatch = new CountDownLatch(parallel); Runnable runnable = countDownLatch::countDown; Runnables.runParallel(Flux.range(0, 2).map(i -> runnable)); assertThat(countDownLatch.await(2, TimeUnit.MINUTES)).isTrue(); }
public static void runParallel(Runnable... runnables) { Flux<Runnable> stream = Flux.just(runnables); runParallel(stream); }
Runnables { public static void runParallel(Runnable... runnables) { Flux<Runnable> stream = Flux.just(runnables); runParallel(stream); } }
Runnables { public static void runParallel(Runnable... runnables) { Flux<Runnable> stream = Flux.just(runnables); runParallel(stream); }  }
Runnables { public static void runParallel(Runnable... runnables) { Flux<Runnable> stream = Flux.just(runnables); runParallel(stream); }  static void runParallel(Runnable... runnables); static void runParallel(Flux<Runnable> runnables); }
Runnables { public static void runParallel(Runnable... runnables) { Flux<Runnable> stream = Flux.just(runnables); runParallel(stream); }  static void runParallel(Runnable... runnables); static void runParallel(Flux<Runnable> runnables);  }