12typedef struct TaskQueue TaskQueue;
TaskQueueFlagsEnum
Task queue configuration flags.
bool(* TQUICallback)(TaskQueue *tq)
@ TASK_Deferred
Task is deferred, waiting for explicit advancement.
@ TASK_Created
Task has been created but not yet queued.
@ TASK_Running
Task is currently executing on a worker.
@ TASK_State_Mask
Mask to extract state value without flags.
@ TASK_Scheduled
Task is scheduled to run at a future time.
@ TASK_Cancelled
Flag indicating task has been cancelled (combines with state)
@ TASK_Failed
Task failed during execution.
@ TASK_Succeeded
Task completed successfully.
@ TASK_Waiting
Task is queued and waiting for a worker.
Complete configuration for a task queue.
uint32 flags
Combination of TaskQueueFlagsEnum values.
int64 mGC
How often a garbage collection cycle should run.
TaskQueueThreadPoolConfig pool
Thread pool configuration.
TaskQueueMonitorConfig monitor
Monitor configuration.
Queue monitoring configuration for detecting stalled tasks.
int64 mTaskRunning
Warn if a task has been running longer than this.
int64 mTaskWaiting
Warn if a task has been waiting for a worker longer than this.
int64 mSuppress
Suppress repeated warnings for this duration after emitting one.
LogCategory * mLogCat
Custom log category for monitor messages (NULL for default)
int64 mInterval
How often the monitor checks the queue (0 to disable)
int64 mTaskStalled
Warn if a deferred task hasn't made progress in this time.
Thread pool configuration for a task queue.
int wMax
Absolute maximum number of workers.
int64 tRampDown
Delay before removing an idle worker from the pool.
int64 tIdle
Time before queue is considered idle (allows worker reduction)
TQUICallback ui
If set, workers handle UI events using this callback.
int wIdle
Absolute minimum workers when queue is completely idle.
int wInitial
Initial number of workers when starting the queue.
int64 tRampUp
Delay between adding workers to the pool.
int wBusy
Target number of workers when queue is busy.
int loadFactor
Average queue depth per worker that is acceptable before scaling up.