Francesco Vasco
Francesco Vasco
@Anton-Spaans-Intrepid Do you think that the current `runCathing` function should rethrow any `InterruptedException`?
I need to batch live events to reduce synchronization cost and limit refresh rate. Currently I implemented this feature in my project: events are sent to a channel and batched...
> Natural aka. smart batching is a technique in stream processing that optimizes throughput without affecting latency. The above statement is reasonable but have to be proven for at least...
Hi @mtopolnik for your use case you can consider: ```kotlin suspend fun Channel.consumeEachBlock(maxBlockSize: Int, consumer: (List) -> Unit) { consume { val buffer = ArrayList(maxBlockSize) while (coroutineContext[Job]?.isActive != false) {...
@mtopolnik > This code looks very similar to the code I wrote in the issue description. Sorry, I forget it :-( > You have explicit checking of the isActive flag,...
> What problem does it solve to be introduced into the library? Reduce synchronization costs (adding a block in an ArrayChannel)
None for `sendMany` or `receiveMany`.
Maybe `yield` is more appropriate than `delay`. https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental/yield.html
Is it "safe" to support unfair channel? Unlimited/Conflated channel should be always fair. Maybe this decision should be motivated, if performance gain of unfair channel is negligible then I don't...
A little case study on Unlimited/Conflated Channel. The following case is valid on single thread, but it is acceptable for the ForkJoinPool on a loaded machine. Here an example code:...