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

Skip to content

Conversation

@iravid
Copy link
Member

@iravid iravid commented Sep 12, 2019

…rUnbounded

A couple of combinators I needed for zio-kafka.

* @note Prefer capacities that are powers of 2 for better performance.
*/
final def buffer(capacity: Int): ZStreamChunk[R, E, A] =
ZStreamChunk(chunks.buffer(capacity))
Copy link
Member

Choose a reason for hiding this comment

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

How about adding a dropping strategy?

Copy link
Member

@jdegoes jdegoes left a comment

Choose a reason for hiding this comment

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

Looks good to me. Like @regiskuckaertz says, the dropping strategy could be useful. Don't see a super clean way to add the family but it's clear for every queue, there could be a corresponding buffer type.

@iravid
Copy link
Member Author

iravid commented Sep 12, 2019

@jdegoes @regiskuckaertz Yeah! We can add bufferUnbounded, bufferDropping etc. I will add tickets and we'll take care of this.

@iravid iravid merged commit eefd165 into zio:master Sep 12, 2019
fsvehla pushed a commit to fsvehla/zio that referenced this pull request Sep 21, 2019
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.

3 participants