-
Couldn't load subscription status.
- Fork 1.4k
Optimise ZChannel::mapOutZIOParUnordered code
#9602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
1dcdf90 to
37107c5
Compare
37107c5 to
50e7dd7
Compare
ad06a2b to
771e128
Compare
| f: OutElem => ZIO[Env1, OutErr1, OutElem2] | ||
| )(implicit trace: Trace): ZChannel[Env1, InErr, InElem, InDone, OutErr1, OutElem2, OutDone] = | ||
| )(implicit trace: Trace): ZChannel[Env1, InErr, InElem, InDone, OutErr1, OutElem2, OutDone] = { | ||
| sealed trait ResultUnordered |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't name it Result. Mima was complaining. Probably clashing with the Result in mergeAllWith
zio.stream.ZChannel::mapOutZIOParUnordered codeZChannel::mapOutZIOParUnordered code
|
@kyri-petrou This PR is ready for review :) |
| outgoing.offer(ResultUnordered.Failure) | ||
| case Left(x: Right[OutErr, OutDone]) => | ||
| permits.withPermits(n0)(ZIO.unit).interruptible *> | ||
| outgoing.offer(ResultUnordered.Done(x.value)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would previously offer an Exit.Failure(Right(...)) but now it offers a Done instead of Failure. Is that intended?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| case Right(c) if c.isInterruptedOnly => ZChannel.refailCause(failure0) | ||
| case Right(cause) => ZChannel.refailCause(cause) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it was possible (old L793)
|
Closed in favour of #10080 as the rebase was becoming impossible Sorry about that |
Similar changes to those made in #9383 and #9556
Also took these changes into consideration in this PR: #9478