Skip to content

Th2 4297#15

Draft
Toru8P wants to merge 4 commits intodevfrom
TH2-4297
Draft

Th2 4297#15
Toru8P wants to merge 4 commits intodevfrom
TH2-4297

Conversation

@Toru8P
Copy link

@Toru8P Toru8P commented Oct 17, 2022

No description provided.

@Toru8P Toru8P self-assigned this Oct 17, 2022
@Toru8P Toru8P changed the base branch from master to dev October 17, 2022 07:40
@Toru8P Toru8P requested a review from cordwelt October 17, 2022 07:41
abstract class Batcher<T>(
private val maxBatchSize: Int = 1000,
private val maxFlushTime: Long = 1000,
private val addGroup: MessageGroupBatch.Builder.(MessageGroup) -> Boolean,
Copy link
Contributor

Choose a reason for hiding this comment

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

I've did a little digging and looks like we can avoid passing whole builder to a user-function and can pass groups-list from it instead (it seems to be unmodifiable). This way user-function won't have ability to mutate batch and still can check if it can fit a new group in it

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