3

In Oracle Java documentation for CompletionStage and ComletableFuture all *Async methods without an explicit Executor argument refer to some stage's default asynchronous execution facility

executes the given action using this stage's default asynchronous execution facility

But what is this "execution facility" is not explicitly defined! Does this mean some default executor/tread pool?

At least ComletableFuture doc mentions:

All async methods without an explicit Executor argument are performed using the ForkJoinPool.commonPool()

So, does this mean that ForkJoinPool.commonPool() is a "default asynchronous execution facility"?

What else, besides a thread pool and an Executor could be a "default asynchronous execution facility"?

radistao
  • 14,889
  • 11
  • 66
  • 92
  • yes, but even `ForkJoinPool.commonPool()` is not defined within the spec or documentation, so it's *an implementation detail* – Eugene Mar 09 '18 at 20:40
  • You mean for `Completion*Stage*`, but for `Completable*Future*` common ForkJoinPool i explicitly defined and documented, isn't it? – radistao Mar 09 '18 at 20:43
  • right, to be honest I entirely missed `CompletableFuture` documentation, still had my head in streams... my bad and thank you – Eugene Mar 09 '18 at 20:49

0 Answers0