简体   繁体   中英

Can onSuccess/onFailure replace setHandler of CompositeFuture in vert.x?

I thought they were the same, but sometime, both of onSuccess and onFailure might not be entered, that's very strange, does anyone know that? Thank you!

CompositeFuture.all(future1(), future2(), future3())
                .setHandler(ar -> {
                    if (ar.succeeded()) {
                    } else {}
                });
CompositeFuture.all(future1(), future2(), future3())
                .onSuccess(result -> {
                })
                .onFailure(e -> {
                });

This bug has been reported and will be fixed in 3.8.5 (due in the next couple weeks).

https://github.com/eclipse-vertx/vert.x/issues/3242

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM