CX Framework
Cross-platform C utility framework
Loading...
Searching...
No Matches
MultiphaseTask Struct Reference

Multiphase task with internal state machine for sequential execution phases. More...

#include <mptask.h>

Public Member Functions

 atomic (uint32) state
 
 Weak (ComplexTaskQueue) *lastq
 Last queue this task ran on before being deferred.
 
 atomic (uint32) _advcount
 Number of times task has been advanced.
 

Data Fields

void * logctx
 
string name
 Task name shown in monitor output.
 
int64 last
 Last time this task was moved between queues and/or run.
 
cchain oncomplete
 Functions called when task completes (success or failure)
 
int64 nextrun
 Next scheduled run time.
 
int64 lastprogress
 Timestamp of last progress change.
 
sa_TaskRequires _requires
 List of requirements (dependencies, resources, gates)
 
uint16 flags
 Task behavior flags (ComplexTaskFlagsEnum)
 
uint16 _intflags
 Internal flags reserved for scheduler use.
 
sa_MPTPhaseFunc phases
 Normal execution phases.
 
sa_MPTPhaseFunc failphases
 Failure handling phases.
 
uint32 _phase
 Current phase index.
 
bool _fail
 True if currently executing fail phases.
 

Detailed Description

Multiphase task with internal state machine for sequential execution phases.

Definition at line 117 of file mptask.h.

Member Function Documentation

◆ atomic()

MultiphaseTask::atomic ( uint32  )

Current task state and flags

Field Documentation

◆ logctx

void* MultiphaseTask::logctx

Log context captured when the task was added to a queue and restored around run(), so records written on the worker thread still carry the submitter's log context. Owned; use logCtx* to touch it.

Definition at line 134 of file mptask.h.


The documentation for this struct was generated from the following file: