enum mrpt::WorkerThreadsPool::queue_policy_t

Overview

Queue overflow policy when all threads are busy. More…

#include <WorkerThreadsPool.h>

enum queue_policy_t
{
    POLICY_FIFO,
    POLICY_DROP_OLD,
};

Detailed Documentation

Queue overflow policy when all threads are busy.

Enum Values

POLICY_FIFO

Default policy: all tasks are executed in FIFO order.

No drops. Tasks will queue up indefinitely until workers become available.

POLICY_DROP_OLD

If a task arrives and there are more pending tasks than worker threads, drop the oldest pending tasks until queue size equals thread count minus one.

Running tasks are never aborted. Useful for real-time systems where old data becomes stale.