Represents a go-like channel, a multi-producer (Sender) multi-consumer (Receiver) thread-safe data pipe.
More...
#include <Channel.hpp>
|
| static std::pair< Sender, Receiver > | create (auto &&context, std::size_t capacity) |
| | Factory function to create channel components.
|
template<typename T,
ProducerType P = ProducerType::Multi,
ConsumerType C = ConsumerType::Multi>
class util::Channel< T, P, C >
Represents a go-like channel, a multi-producer (Sender) multi-consumer (Receiver) thread-safe data pipe.
- Note
- Use INSTANTIATE_CHANNEL_FOR_CLANG macro when using this class. See docs at the bottom of the file for more details.
- Template Parameters
-
◆ create()
Factory function to create channel components.
- Parameters
-
| context | A supported context type (either io_context or thread_pool) |
| capacity | Size of the internal buffer on the channel |
- Returns
- A pair of Sender and Receiver
The documentation for this class was generated from the following file: