StormByte-Buffer 4.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 Bridge::Drainer. More...

Functions

STORMBYTE_FORCE_INLINE constexpr std::string_view ToString (Status status) noexcept
 Enumerator name of status.
STORMBYTE_FORCE_INLINE 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 Bridge::Drainer.

Enumerator
Toggle 

Switch between Started and 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.

Construction if high_water is 0.

Stopped 

No backend.

Function Documentation

◆ ToString() [1/2]

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

Enumerator name of operation.

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

◆ ToString() [2/2]

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

Enumerator name of status.

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