just passed 1M downloads on npm! π
just passed 1M downloads on npm! π
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
YOU DONβT HAVE TO SUFFER
if that happens shut the door right away and call us
fig. 1: impossible states when your product type could've been a sum type
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
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
yeah, pipes are good on paper, but in the current JS/TS tooling it hurts autocompletion.
(weβll consider providing it as an alternative API if github.com/tc39/proposa... lands at some point)