|
MT Showcase SDK
|
This allows consuming of single value stream by multiple consumers, so that each consumer will receive all values produced by the underlying stream. More...
#include <ValueStreamChannels.hpp>
Public Member Functions | |
| folly::Future< ReturnType > | next (int channel) |
| ChannelGuard < ValueStreamChannel< T > > | openChannel () |
| Opens new channel. More... | |
|
ChannelGuard < ValueStreamChannel< T > > | cloneChannel (int target) |
| Ensures that all the values are passed to the new cloned channel. | |
| std::shared_ptr< ValueStream< T > > | stream () |
| This allows straight access to underlying stream. More... | |
Public Member Functions inherited from Showcase::ValueStream< T > | |
| int | forEachSync (const std::function< void(const T &)> &f, int N, const std::function< bool(const T &)> &endCond=nullptr) |
| Executes f for each next N values in the Stream as long as values are being generated. More... | |
This allows consuming of single value stream by multiple consumers, so that each consumer will receive all values produced by the underlying stream.
| folly::Future< CallbackLock< T > > Showcase::ValueStreamSplitter< T >::next | ( | int | channel | ) |
Start immediately work on promised things
| ChannelGuard< ValueStreamChannel< T > > Showcase::ValueStreamSplitter< T >::openChannel | ( | ) |
Opens new channel.
Starting point of the channel events is the same as the channel that has proceeded furthest on the stream
| std::shared_ptr< ValueStream< T > > Showcase::ValueStreamSplitter< T >::stream | ( | ) |
This allows straight access to underlying stream.
It is only available if no channels are opened.