Search code examples
java-8promisevert.xcompletable-future

Does Vertx 3 support CompletableFuture?


I want to develop my application promise style using vertx and CompletableFuture fits really for this purpose but JVM uses fork/join on the background for CompletableFuture and this may break Vertx Thread Safety.

Do you have any idea or have used this feature on your project?


Solution

  • Yes it does, here is an example http://qrman.github.io/posts/2015/08/28/callback_hell_completablefuture_ftw/

    But I think JavaRx is the better solution because its supported as first class citizen by vert.x http://vertx.io/docs/vertx-rx/java/