foldright / cffu

🦝 Java CompletableFuture-Fu(CF-Fu, pronounced "Shifu"), a tiny sidekick library to make CompletableFuture usage more convenient, more efficient and safer in your application. 😋🚀🦺
https://github.com/foldright/cffu
Apache License 2.0
156 stars 21 forks source link

implement `anySuccess/any(Complete) M* methods` in `CompletableFutureUtils`/`CffuFactory`/`Cffu` #191

Closed oldratlee closed 2 months ago

oldratlee commented 2 months ago
oldratlee commented 2 months ago

this feature introduced a new run strategy allSuccess.


当有结果(返回不是CF<Void>)时,6个执行策略一套:

  1. allFastFail
  2. allSuccess
  3. mostSuccess
  4. all(Complete)
  5. anySuccess
  6. any(Complete)

当无结果(返回是CF<Void>)时,4个执行策略一套:

  1. allFastFail
  2. all(Complete)
  3. anySuccess
  4. any(Complete)

mostSuccess对于不带回结果的方法,感觉是无意义的:

类似的,allSuccess对于不带回结果的方法,也是无意义的: