Syntalos::detail::WorkerHolder

Syntalos::detail::WorkerHolder

Syntalos::detail::WorkerHolder

More…

Inherits from Syntalos::detail::WorkerHolderBase

Public Functions

Name
WorkerHolder(W && w)
virtual boolisThreadWorker() const override
True if the worker wants a dedicated thread, false if it is driven by events.
virtual std::expected< void, QString >run() override
Run the worker in the current thread.
voidsetupEvents()
Let an event-driven worker register its events.

Public Attributes

Name
Wworker

Additional inherited members

Public Functions inherited from Syntalos::detail::WorkerHolderBase

Name
WorkerHolderBase() =default
virtual~WorkerHolderBase()
const WorkerEvents &events() const

Protected Attributes inherited from Syntalos::detail::WorkerHolderBase

Name
WorkerEventsm_events

Detailed Description

template <typename W >
class Syntalos::detail::WorkerHolder;

Public Functions Documentation

function WorkerHolder

inline explicit WorkerHolder(
    W && w
)

function isThreadWorker

inline virtual bool isThreadWorker() const override

True if the worker wants a dedicated thread, false if it is driven by events.

Reimplements: Syntalos::detail::WorkerHolderBase::isThreadWorker

function run

inline virtual std::expected< void, QString > run() override

Run the worker in the current thread.

Return: The error the worker has failed with, if any.

Reimplements: Syntalos::detail::WorkerHolderBase::run

function setupEvents

inline void setupEvents()

Let an event-driven worker register its events.

Must only be called once the worker is at its final address, as the callbacks usually refer to it.

Public Attributes Documentation

variable worker

W worker;

Updated on 2026-11-26 at 18:54:14 +0000