While you have a simple Future.all to run all futures in parallel (like Promise.all does), you might want to limit the concurrency at which you execute operations.
Using Future.concurrent, you can specify the maximum concurrency for your array of operations.
Retry with maximum attempts
If getUserById outputs a Result.Ok value, the future resolves, if it outputs a Result.Error, it re-executes getUserById.
Retry with delay
The function you pass Future.retry takes an attempt parameter, which is the current number of attempts. The count starts at 0.
did you know?
maximum concurrency & retry mechanisms are directly handled in Boxed since 2.3.0
24.12.2024 14:20 β π 0 π 0 π¬ 0 π 0
YOU DONβT HAVE TO SUFFER
20.12.2024 23:35 β π 1 π 0 π¬ 0 π 0
if that happens shut the door right away and call us
20.12.2024 23:34 β π 2 π 1 π¬ 1 π 0
fig. 1: impossible states when your product type could've been a sum type
20.12.2024 08:21 β π 4 π 1 π¬ 0 π 0
itβd require a lot of changes in the way intellisense handles these kind of things, maybe the pipeline operator will drive some work on this area
19.12.2024 20:26 β π 0 π 0 π¬ 1 π 0
with chaining, each value comes with its available functions as they belong in the prototype, with pipes you have to open a pipe, then import the module, then start typing
19.12.2024 20:19 β π 0 π 0 π¬ 1 π 0