Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@adamgfraser
Copy link
Contributor

Currently in parallel operations such as zipWithPar if the workflows run in parallel each add finalizers those finalizers will be run sequentially in the reverse order of being added unless parallelFinalizers is explicitly used to indicate that finalizers should be run in parallel. This can introduce an unnecessary dependency between finalizers.

This PR improves this by implementing a parallelFinalizersMask operator which indicates that finalizers should be run in parallel but also provides a restore function that can be used to restore the original execution strategy for finalizers. It then uses this in ZIO#zipWithPar and ZIO.collectAllPar, as well as making similar changes in ZLayer#++.

@adamgfraser adamgfraser requested a review from jdegoes June 15, 2023 04:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants