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

Skip to content

Conversation

@guizmaii
Copy link
Member

@guizmaii guizmaii commented Apr 7, 2025

No description provided.

@guizmaii guizmaii marked this pull request as draft April 7, 2025 06:19
@guizmaii guizmaii force-pushed the ZPipeline_mapEitherChunked branch 3 times, most recently from ce7616f to 196637d Compare April 7, 2025 06:25
@guizmaii guizmaii force-pushed the ZPipeline_mapEitherChunked branch 2 times, most recently from 051f7a2 to 9156fe7 Compare April 7, 2025 06:46
@guizmaii guizmaii self-assigned this Apr 7, 2025
@guizmaii guizmaii force-pushed the ZPipeline_mapEitherChunked branch from 9156fe7 to 7e857e6 Compare April 7, 2025 07:10
@guizmaii guizmaii marked this pull request as ready for review April 7, 2025 07:11
*
* Will stop on the first Left found
*/
def mapEitherChunked[Env, Err, In, Out](
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hesitated between mapEither and mapEitherChunked

)(implicit trace: Trace): ZPipeline[Env, Err, In, Out] = {
lazy val reader: ZChannel[Env, Err, Chunk[In], Any, Err, Chunk[Out], Any] =
ZChannel.readWithCause(
chunk => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since destroying chunking is not uncommon, I'm wondering whether we should shortcut chunk.size == 1

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a good idea! Thanks :)

Done

@guizmaii guizmaii requested a review from kyri-petrou April 9, 2025 00:59
@guizmaii guizmaii merged commit 6015c79 into series/2.x Apr 10, 2025
18 checks passed
@guizmaii guizmaii deleted the ZPipeline_mapEitherChunked branch April 10, 2025 07:00
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