Pass a Callable to executeBlocking

Proprietary

Vert.x 5 removed executeBlocking(Handler<Promise<T>>, Handler<AsyncResult<T>>) and its variants. The blocking code becomes a Callable<T> that returns the value it completed the promise with and throws the exception it failed it with, and the result handler moves to onComplete(..) on the returned Future. Blocking code that completes the promise anywhere but at the end of each of its paths, or that hands the promise to other code, is left alone.

io.moderne.vertx.ExecuteBlockingToCallable
mod run . --recipe=io.moderne.vertx.ExecuteBlockingToCallable

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.