Syntalos::OptionalWaitCondition
Syntalos::OptionalWaitCondition
The OptionalWaitCondition class. More…
#include <optionalwaitcondition.h>
Public Classes
| Name | |
|---|---|
| class | OWCData |
Public Functions
| Name | |
|---|---|
| OptionalWaitCondition() | |
| void | wait() |
| void | wait(AbstractModule * mod) |
| uint | waitingCount() const Number of threads that parked on this barrier so far (diagnostic). |
| bool | isReleased() const Whether the barrier has already been released via wakeAll(). |
Friends
| Name | |
|---|---|
| class | Engine |
| class | TestWaitCondition |
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() constNumber of threads that parked on this barrier so far (diagnostic).
function isReleased
bool isReleased() constWhether 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