As an optimization, VertxCoroutineExecutor used to execute the command immediately if running on the right context (the context provided at creation time or one of its duplicates).
But this is not compliant with the CoroutineDispacther contract: invocations of dispatch should actually defer execution.
Instead, we introduce a custom CoroutineDispatcher that implements isDispatchNeeded. This method shall return false in the optimization can be applied.
See #233
As an optimization,
VertxCoroutineExecutor
used to execute the command immediately if running on the right context (the context provided at creation time or one of its duplicates).But this is not compliant with the
CoroutineDispacther
contract: invocations ofdispatch
should actually defer execution.Instead, we introduce a custom
CoroutineDispatcher
that implementsisDispatchNeeded
. This method shall returnfalse
in the optimization can be applied.