Module sync/cond

sync/cond

Condition variable for thread synchronization.

Types

cond_t newtype
cond_t

Low-level condition variable (manual lifetime via destroy).

Fields

NameTypeDescription
cv__YO_COND_TYPE
impl(cond_t, ...)
new : (cond_t) fn() -> cond_t

Returns: cond_t

wait : (cond_t) fn(self : *(cond_t), mutex : *(mutex_t)) -> unit

Parameters

NameTypeNotes
self*(cond_t)
mutex*(mutex_t)

Returns: unit

signal : (cond_t) fn(self : *(cond_t)) -> unit

Parameters

NameTypeNotes
self*(cond_t)

Returns: unit

broadcast : (cond_t) fn(self : *(cond_t)) -> unit

Parameters

NameTypeNotes
self*(cond_t)

Returns: unit

destroy : (cond_t) fn(self : *(cond_t)) -> unit

Parameters

NameTypeNotes
self*(cond_t)

Returns: unit

Cond atomic object
Cond

Reference-counted condition variable with automatic cleanup via Dispose. Uses atomic reference counting for safe cross-thread sharing.

Fields

NameTypeDescription
cv__YO_COND_TYPE

Trait Implementations

impl(Cond, ...)
new : (Cond) fn() -> Cond

Returns: Cond

wait : (Cond) fn(self : Cond, mutex : Mutex) -> unit

Parameters

NameTypeNotes
selfCond
mutexMutex

Returns: unit

signal : (Cond) fn(self : Cond) -> unit

Parameters

NameTypeNotes
selfCond

Returns: unit

broadcast : (Cond) fn(self : Cond) -> unit

Parameters

NameTypeNotes
selfCond

Returns: unit

impl(Cond, Dispose(...))
dispose : (fn(self : Self) -> unit)

Returns: unit