Syntalos::detail::WorkerHolder
Syntalos::detail::WorkerHolder
Inherits from Syntalos::detail::WorkerHolderBase
Public Functions
| Name | |
|---|---|
| WorkerHolder(W && w) | |
| virtual bool | isThreadWorker() 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. |
| void | setupEvents() Let an event-driven worker register its events. |
Public Attributes
| Name | |
|---|---|
| W | worker |
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 | |
|---|---|
| WorkerEvents | m_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 overrideTrue 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() overrideRun 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