Closed linzee1 closed 2 days ago
I think there are two ways to keep it convenient for users who don't have a lot of call volume to use. If they all need to define executors themselves, it would be too cumbersome
I saw some methods do not require user to pass executors. It is often dangerous and error-prone to use common pool in Java.
cffu
lib supports the best practice and safe usage of executor by new classes:
support the default executor setting for safety(and convenience), and MUST set.
Why not remove methods that using common pool to avoid misuse?
Class CompletableFutureUtils
enhances the CompletableFuture
and has consistent conventions with CompletableFuture
;
otherwise it will be too "clever" and surprise as a util class
.
Being simple and unadorned is OK and recommended for util class CompletableFutureUtils
.
@linzee1 @XW512
Close this issue for the specific cffu design case.
Welcome to continue the discussion of design 💕
I saw some methods do not require user to pass executors. It is often dangerous and error-prone to use common pool in Java. Why not remove methods that using common pool to avoid misuse?
Wrong use case Dangerous use of ForkJoinPool