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

API reference / Tasks

Functions and constants functions

Free functions and constants of Tasks.

On this page
Use
import ThinkMeta.ConcurrentTasks.Tasks.RunAndWait;
Namespace
ThinkMeta::ConcurrentTasks::Tasks
Platforms
Windows, Linux

Functions

Tasks::RunAndWait

Runs a callable on a scheduler and waits until it has finished.

Syntax

template <std::invocable F>
void RunAndWait(ITaskScheduler& scheduler, F&& func) noexcept;

Template parameters

Fstd::invocable
Type of the callable: invocable without arguments; it must not throw.

Parameters

schedulerITaskScheduler&
The scheduler to run the callable on, e.g. the worker threads.
funcF&&
The callable; neither copied nor moved, since the call waits for it.

Remarks

The calling task waits without blocking its thread: called from a task of a dispatcher scheduler (an event handler on the UI thread), the UI keeps running and the handler continues on the UI thread once the callable has finished. Task or converted thread only. To spread work over several tasks, count them into a Synchronization::TaskGroup_s, add them with Task::Schedule and wait for the group.

See also

WaitableLambdaTask_s

Concepts

Tasks::WaitableTaskType

Matches the waitable task types of this module.

Syntax

template <typename T>
concept WaitableTaskType =
    std::same_as<T, WaitableTask>
    || std::same_as<T, WaitableTask_s>;

Template parameters

Ttypename
The candidate type.

Remarks

Satisfied by WaitableTask and WaitableTask_s.

See also

WaitableTask, WaitableTask_s

Generated from ThinkMeta.ConcurrentTasks.API @ c7663c4 (2026-11-19).