You could also, with some amount of effort, use the standard libraries' built in ForkJoinPool used for the CompletableFuture
API. If we were designing invokeAsynchronous
again from scratch, this is what we'd almost certainly use 'under the hood', but the function predates CompletableFuture
entirely.
1 Like