CLOVIS02/15/2020, 3:48 PM
or something similar), and from one-to-many producers to add new data to it. That sounds awfully similar to what a Channel is, however from my understanding the consumer·s of a channel act as soon as an element is produced, rather than when they want to? Basically I'm searching for a way to have the client decide when new elements are produced, and that data structure would have some kind of buffer of size
so the client could almost always get the data instantaneously, and the producer·s would get to work immediately when the buffer gets too small to add new elements.
diesieben0702/15/2020, 3:57 PM
suspends the sender until there is room available in the buffer. Backpressure is built-in, you don't need to do anything special.
there will only ever be 5 objects in memory at most, even if the receiver is too slow. The sender will just have to wait then (suspended).
kevin.cianfarini02/15/2020, 4:01 PM
since they're suspending functions. I would recommend using flow over channel
streetsofboston02/15/2020, 4:34 PM
CLOVIS02/17/2020, 10:44 AM