INotifyTaskStateChange interface
Is told when a task has finished.
On this page
- Use
#include <ThinkMeta.ConcurrentTasks/Core.h>- Namespace
ThinkMeta::ConcurrentTasks- Platforms
- Windows, Linux
Syntax
struct INotifyTaskStateChangeMethods
OnTaskExited
Called by the core once the task has exited.
Syntax
virtual void OnTaskExited() noexcept = 0;Remarks
A task exits when its ITask::Run has returned, or when it exits without running: cancelled before it started (CancelTask), or added by ITaskScheduler::AddTimedTask while timers stop (DisableTimers). Called on a scheduler thread of the task's scheduler, from the fiber that ran the task; the core no longer touches the task object afterwards, so this is the earliest point at which the object may be destroyed or added again. Must not throw.
See also
Generated from ThinkMeta.ConcurrentTasks.API @ c7663c4 (2026-11-19).