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

Skip to content

Conversation

@adamgfraser
Copy link
Contributor

Resolves #8244.

ZChannel.flatMap and ZChannel.fold run finalizers associated with the left hand side channel before executing the right hand side channel, as the left hand side channel is conceptually "done" at that point. In contrast ZChannel.concatMap defers running finalizers associated with the outer channel until the inner channels complete execution.

Currently ZStream.tapError and Stream.tapErrorCause can prematurely close the scope, because they are implemented in terms of ZChannel.fold. This PR changes this by implementing these operators in terms of ZChannel.pipeTo.

@adamgfraser adamgfraser requested review from jdegoes and vigoo and removed request for jdegoes July 5, 2023 19:23
@jdegoes jdegoes merged commit e3f2196 into zio:series/2.x Jul 14, 2023
@adamgfraser adamgfraser deleted the 8244 branch July 14, 2023 14:30
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.

Strange ZStream peel scope handling

2 participants