question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make ConflatedBroadcastChannel allocation-free

See original GitHub issue

ConflatedBroadcastChannel is used in UI applications as “observable value source” and it would be useful to make it operate in a fully allocation-free way on its send-receive path even though for the cost of losing some lock-freedom (it is not much of importance there).

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

5reactions
elizarovcommented, Apr 11, 2019

No updates yet. We are now focused on two areas:

  1. Integrating flows
  2. Rewriting regular channels for better performance. However, the focus is on scalability under load and their throughput for server-side applications (think of competing with Go) not on allocation-freedom itself. They will allocate less but will not be free from allocations. Moreover, the first release is going to address only point-to-point channels. “BroadcastChannels” rewrite to the new, faster algorithms, will have to wait.

The idea that I have in mind, though, is that for #1082, instead of turning “ConflatedBroadcastChannel” into the “DataFlow” we can reimplement “DataFlow” from scratch, maybe dropping some for its channel features, thus making it simpler, and open the road to lock-based allocation-free implementation.

0reactions
elizarovcommented, May 7, 2020

This issue will be fixed in #1974 by providing allocation-free capabilities similar to ConflatedBroadcastChannel.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Shared flows, broadcast channels - Roman Elizarov - Medium
An implementation of a state flow has allocation-free updates, which was not the case with a conflated broadcast channel.
Read more >
ConflatedBroadcastChannel - Kotlin
A secondary constructor can be used to create an instance of this class that already holds a value. This channel is also created...
Read more >
ConflatedBroadcastChannel - kotlinx-coroutines-core
Opens subscription to this BroadcastChannel and makes sure that the given block consumes all elements from it by always invoking cancel after the...
Read more >
Kotlin ConflatedBroadcastChannel.offer() doesn't work?
I am sending a value via MyRepository.myConflatedChannel.offer(myvalue) . I then expect to receive it in collect { } or onEach { } blocks...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found