Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::format::StateRestoreGate Class Reference

#include <state_restore_gate.hpp>

Classes

class  RenderLock
 Audio-thread pin. More...
class  RestoreLock
 Control-thread hold. More...

Public Member Functions

RenderLock lock_for_render () noexcept
 Audio-thread entry.
RestoreLock lock_for_restore ()
 Control-thread entry.
std::uint64_t contended_blocks () const noexcept
 Blocks that rendered silence because a restore held the gate.

Member Function Documentation

◆ contended_blocks()

std::uint64_t pulp::format::StateRestoreGate::contended_blocks ( ) const
inlinenoexcept

Blocks that rendered silence because a restore held the gate.

A healthy session sees a small number of these around each preset load; a growing count means something is holding the gate far too long.

◆ lock_for_render()

RenderLock pulp::format::StateRestoreGate::lock_for_render ( )
inlinenoexcept

Audio-thread entry.

Lock-free and wait-free; hold for the whole process() body, because a reader already inside process() is invisible to a gate taken only around entry.

◆ lock_for_restore()

RestoreLock pulp::format::StateRestoreGate::lock_for_restore ( )
inline

Control-thread entry.

Blocks until every in-flight process() call has returned, then keeps the audio thread out until the returned lock is released. Restores are serialized against each other. Never call this from process().


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