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

API reference / Tasks

LambdaTask class

A Task that runs a stored callable.

Use
import ThinkMeta.ConcurrentTasks.Tasks.Task;
Namespace
ThinkMeta::ConcurrentTasks::Tasks
Inherits
Task

Syntax

template <std::invocable F> class LambdaTask : public Task

Template parameters

Fstd::invocable
Type of the stored callable: an object type invocable without arguments; it must not throw.

Remarks

Run calls the stored callable of type F. Usually built by Task::Create. The callable must not throw: an exception escaping it ends the process.

Constructors

LambdaTask

Stores the callable.

Syntax

template <std::invocable FF>
explicit LambdaTask(
    FF&& func,
    INotifyTaskStateChange* notifyTaskStateChange = nullptr
) noexcept : Task(notifyTaskStateChange), func_(std::forward<FF>(func));

Template parameters

FFstd::invocable
Type of the argument; F must be constructible from it.

Parameters

funcFF&&
Copied or moved into F.
notifyTaskStateChangeINotifyTaskStateChange*
Told when the task exits; may be nullptr.Default: nullptr

Methods

Run

Calls the stored callable.

Syntax

void Run() noexcept override;

Remarks

The task may be run again after Task::OnTaskExited.

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