stlab 2.3.0
Modern, modular C++ algorithms, data structures, and concurrency primitives
Loading...
Searching...
No Matches
stlab::buffer_size Struct Reference

Per-process input queue capacity for flow control (combine with a process via operator&). More...

#include <channel.hpp>

Public Member Functions

 buffer_size (std::size_t b)
 Constructs a buffer limit of b elements (0 = unbounded).

Public Attributes

std::size_t _value

Detailed Description

Per-process input queue capacity for flow control (combine with a process via operator&).

Default queue size is 1 (a value must be received before the process may yield the next). Combine buffer_size with a process using operator& before attaching via receiver::operator|. buffer_size{0} means no bound other than available memory. While yielding, a process may run until its buffer is full, then suspends; during await it may suspend even when the buffer is not full if no value is available.


The documentation for this struct was generated from the following file: