Syntalos::OptionalWaitCondition

Syntalos::OptionalWaitCondition

Syntalos::OptionalWaitCondition

The OptionalWaitCondition class. More…

#include <optionalwaitcondition.h>

Public Classes

Name
classOWCData

Public Functions

Name
OptionalWaitCondition()
voidwait()
voidwait(AbstractModule * mod)
uintwaitingCount() const
Number of threads that parked on this barrier so far (diagnostic).
boolisReleased() const
Whether the barrier has already been released via wakeAll().

Friends

Name
classEngine
classTestWaitCondition

Detailed Description

class Syntalos::OptionalWaitCondition;

The OptionalWaitCondition class.

Create a thread barrier to synchronize a set of threads to run at once.

Threads park in wait() until the owner releases the barrier via wakeAll(). The barrier is “optional” in the sense that a thread which arrives after the barrier was already released passes through immediately instead of blocking forever.

The module-aware wait(AbstractModule*) variant flags the module as READY as part of parking the thread: once a module is seen in the READY state, its thread is guaranteed to receive the next wakeAll() (or has already passed the barrier). This is the property the engine relies on to decide when it is safe to start a run.

Public Functions Documentation

function OptionalWaitCondition

OptionalWaitCondition()

function wait

void wait()

function wait

void wait(
    AbstractModule * mod
)

function waitingCount

uint waitingCount() const

Number of threads that parked on this barrier so far (diagnostic).

function isReleased

bool isReleased() const

Whether the barrier has already been released via wakeAll().

Friends

friend Engine

friend class Engine(
    Engine 
);

friend TestWaitCondition

friend class TestWaitCondition(
    TestWaitCondition 
);

Updated on 2026-09-06 at 20:30:11 +0000