Donner SVG 0.8.0
0.8.0 ยท ebf353960.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::editor::FrameCallbackAdmission Class Reference

Start/stop and callback execution belong to the app thread; admission may run on another thread. More...

#include "donner/editor/FrameCallbackAdmission.h"

Public Member Functions

uint32_t start ()
 Start a new callback generation. A wrapped generation is rejected rather than reused.
void stop ()
 Invalidate borrowed callback data before its owner destroys it.
uint32_t generation () const
 Current generation, or zero after shutdown.
bool isCurrent (uint32_t generation) const
 Whether callback data still belongs to this generation.
bool acquire (uint32_t generation)
 Admit at most one notification until its actual frame finishes.
void complete (uint32_t generation)
 Release admission, including failed posts; stale callbacks cannot clear a new generation.

Detailed Description

Start/stop and callback execution belong to the app thread; admission may run on another thread.

Member Function Documentation

◆ acquire()

bool donner::editor::FrameCallbackAdmission::acquire ( uint32_t generation)
inline

Admit at most one notification until its actual frame finishes.

Parameters
generationTick token.

◆ complete()

void donner::editor::FrameCallbackAdmission::complete ( uint32_t generation)
inline

Release admission, including failed posts; stale callbacks cannot clear a new generation.

Parameters
generationCallback token.

◆ isCurrent()

bool donner::editor::FrameCallbackAdmission::isCurrent ( uint32_t generation) const
inline

Whether callback data still belongs to this generation.

Parameters
generationCallback token.

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