Preliminary. ThinkMeta ConcurrentTasks and this documentation are preliminary; everything is subject to change.

API reference / Synchronization

Suspendable class

Records a suspending task as waiting and then re-checks the primitive's condition.

Use
import ThinkMeta.ConcurrentTasks.Synchronization.Suspendable;
Namespace
ThinkMeta::ConcurrentTasks::Synchronization
Inherits
SuspendableBase

Syntax

template <SuspensionKind _SuspensionKind, typename T> class Suspendable

Template parameters

_SuspensionKindSuspensionKind
SuspensionKind::Multiple: any number of suspended tasks; SuspensionKind::Single: at most one suspended task at a time.
Ttypename
The primitive built on it. Its TryResume() checks the condition and resumes a suspended task if the condition holds.

Remarks

Building block of the synchronization primitives: the re-check (T::TryResume) makes sure that a signal arriving while the task suspends is not lost. The re-check runs once the task is off the processor - on a scheduler thread, or on the converted OS thread itself before it blocks - and may run after another thread has already resumed the task. TryResume therefore must not assume that the task it just recorded is still suspended.

See also

SuspendableBase, Waitable

Generated from ThinkMeta.ConcurrentTasks.API @ 137ec1d (2026-10-17).