Files
java-core-examples/completablefuture/output/02-which-thread.txt
T

18 lines
861 B
Plaintext

availableProcessors = 2
common pool parallelism = 1
caller thread = main
== Stage registered WHILE the previous stage is still running
supplyAsync body ran on ForkJoinPool.commonPool-worker-1
thenApply (registered before slow finished) ran on ForkJoinPool.commonPool-worker-1
thenApplyAsync (no executor) ran on ForkJoinPool.commonPool-worker-1
thenApplyAsync (executor = mine) ran on my-pool-1
== Stage registered AFTER the previous stage finished
thenApply (registered after slow finished) ran on main
thenApply on completedFuture(..) ran on main
== Supplying with your own executor
supplyAsync(.., mine) body ran on my-pool-2
thenApply after supplyAsync(.., mine) ran on my-pool-2