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
| Name | Type | Description |
|---|---|---|
cv | __YO_COND_TYPE |
impl(cond_t, ...)
new : (cond_t) fn() -> cond_tReturns: cond_t
wait : (cond_t) fn(self : cond_t, mutex : mutex_t) -> unitParameters
| Name | Type | Notes |
|---|---|---|
self | cond_t | |
mutex | mutex_t |
Returns: unit
signal : (cond_t) fn(self : cond_t) -> unitParameters
| Name | Type | Notes |
|---|---|---|
self | cond_t |
Returns: unit
broadcast : (cond_t) fn(self : cond_t) -> unitParameters
| Name | Type | Notes |
|---|---|---|
self | cond_t |
Returns: unit
destroy : (cond_t) fn(self : cond_t) -> unitParameters
| Name | Type | Notes |
|---|---|---|
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
| Name | Type | Description |
|---|---|---|
cv | __YO_COND_TYPE |
Trait Implementations
impl(Cond, ...)
new : (Cond) fn() -> CondReturns: Cond
wait : (Cond) fn(self : Cond, mutex : Mutex) -> unitsignal : (Cond) fn(self : Cond) -> unitbroadcast : (Cond) fn(self : Cond) -> unitimpl(Cond, Dispose(...))
dispose : (fn(self : Self) -> unit)Returns: unit