streamly icon indicating copy to clipboard operation
streamly copied to clipboard

Exceptions should be thrown when the result is used

Open harendra-kumar opened this issue 4 years ago • 0 comments

In the concurrent streams we throw an exception as soon as a failure occurs when we are executing actions concurrently. However, many of the actions that are being concurrently executed ahead of time may never be used. If we are executing 10 requests concurrently but ultimately used the results of 5 the application should still work perfectly fine.

To address this, instead of throwing an exception right away in fromSVar we should yield a result that would throw an exception when evaluated.

This is a behavior change, so marking it as breaking change.

harendra-kumar avatar Mar 30 '21 10:03 harendra-kumar