StormByte-Buffer 2.0.0
C++26 buffer module of the StormByte suite
 
Loading...
Searching...
No Matches
StormByte::Buffer::IO::Drainer Namespace Reference

Status and operations of a Bridge pump thread. More...

Enumerations

enum class  Status { Started , Paused , Stopped }
 Whether the Bridge worker is pumping. More...
 
enum class  Operation { Toggle , Flush }
 Verbs for StormByte::Buffer::Bridge::Drainer. More...
 

Functions

constexpr std::string_view ToString (Status status) noexcept
 Enumerator name of status.
 
constexpr std::string_view ToString (Operation operation) noexcept
 Enumerator name of operation.
 

Detailed Description

Status and operations of a Bridge pump thread.

Enumeration Type Documentation

◆ Operation

Verbs for StormByte::Buffer::Bridge::Drainer.

Enumerator
Toggle 

Started ↔ Paused.

Flush 

Push what is already held. No destination flush.

◆ Status

Whether the Bridge worker is pumping.

Stopped is moved-from or no backend. There is no operation that stops a live Bridge; the destructor joins the thread.

Enumerator
Started 

Worker may pull when there is room.

Paused 

Worker does not pull. Ctor if high_water is 0.

Stopped 

No backend.

Function Documentation

◆ ToString() [1/2]

constexpr std::string_view StormByte::Buffer::IO::Drainer::ToString ( Operation  operation)
constexprnoexcept

Enumerator name of operation.

Parameters
operationDrainer operation.
Returns
Stable name, or empty if unknown.

◆ ToString() [2/2]

constexpr std::string_view StormByte::Buffer::IO::Drainer::ToString ( Status  status)
constexprnoexcept

Enumerator name of status.

Parameters
statusDrainer status.
Returns
Stable name, or empty if unknown.