Currently one cannot easily create multiple VertxCompletableFutures on the same context that would execute in parallel – as using supplyBlockingAsync and runBlockingAsync runs provided Supplier/Runnable using the default Context’s executeBlocking() method, which runs code in order, which means that all futures created in such a way are executed sequentially in order of their creation, regardless of the size of the Vertx’s worker executor.
This pull request changes that, passing explicitly false for the ordered parameter when calling the executeBlocking method, and additionally provides methods supplyBlockingAsyncOn() and runBlockingAsyncOn() which accept custom WorkerExecutor instance on which the provided callback will get executed.
Currently one cannot easily create multiple
VertxCompletableFuture
s on the same context that would execute in parallel – as usingsupplyBlockingAsync
andrunBlockingAsync
runs providedSupplier
/Runnable
using the defaultContext
’sexecuteBlocking()
method, which runs code in order, which means that all futures created in such a way are executed sequentially in order of their creation, regardless of the size of the Vertx’s worker executor.This pull request changes that, passing explicitly
false
for theordered
parameter when calling theexecuteBlocking
method, and additionally provides methodssupplyBlockingAsyncOn()
andrunBlockingAsyncOn()
which accept customWorkerExecutor
instance on which the provided callback will get executed.