microfmt
Zero-allocation C++ formatting for constrained environments
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
microfmt::log::space_notifier Class Reference

Type-erased "space was freed" callback handed to the consumer side of a sink (two words, no allocation). More...

#include <sync.hpp>

Public Types

using callback = void(*)(void *) noexcept
 

Public Member Functions

constexpr space_notifier () noexcept=default
 
constexpr space_notifier (void *ctx RELOCO_LIFETIMEBOUND, callback cb) noexcept
 
void notify () const noexcept
 
constexpr operator bool () const noexcept
 

Detailed Description

Type-erased "space was freed" callback handed to the consumer side of a sink (two words, no allocation).

The consumer calls notify after draining data so blocked writers wake.

Member Typedef Documentation

◆ callback

using microfmt::log::space_notifier::callback = void (*)(void *) noexcept

Constructor & Destructor Documentation

◆ space_notifier() [1/2]

constexpr microfmt::log::space_notifier::space_notifier ( )
constexprdefaultnoexcept

◆ space_notifier() [2/2]

constexpr microfmt::log::space_notifier::space_notifier ( void *ctx  RELOCO_LIFETIMEBOUND,
callback  cb 
)
inlineconstexprnoexcept

Member Function Documentation

◆ notify()

void microfmt::log::space_notifier::notify ( ) const
inlinenoexcept

◆ operator bool()

constexpr microfmt::log::space_notifier::operator bool ( ) const
inlineexplicitconstexprnoexcept

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