|
CX Framework
Cross-platform C utility framework
|
Functions | |
| void | tqPresetSingle (TaskQueueConfig *tqconfig) |
| void | tqPresetMinimal (TaskQueueConfig *tqconfig) |
| void | tqPresetBalanced (TaskQueueConfig *tqconfig) |
| void | tqPresetHeavy (TaskQueueConfig *tqconfig) |
| void | tqPresetManual (TaskQueueConfig *tqconfig) |
| void | tqEnableMonitor (TaskQueueConfig *tqconfig) |
| void tqEnableMonitor | ( | TaskQueueConfig * | tqconfig | ) |
void tqEnableMonitor(TaskQueueConfig *tqconfig)
Update an existing config to enable sensible defaults for queue monitoring. Enables detection of stuck tasks, long-running tasks, and tasks waiting too long.
| tqconfig | Configuration structure to update |
| void tqPresetBalanced | ( | TaskQueueConfig * | tqconfig | ) |
void tqPresetBalanced(TaskQueueConfig *tqconfig)
Initialize a queue config with balanced presets based on logical cores. General-purpose configuration suitable for most applications. 2 idle workers, grows to physical CPU count when busy, max = logical CPU count.
| tqconfig | Configuration structure to initialize |
| void tqPresetHeavy | ( | TaskQueueConfig * | tqconfig | ) |
void tqPresetHeavy(TaskQueueConfig *tqconfig)
Initialize a queue config for high performance under sustained heavy load. Uses a dedicated manager thread, 4 idle workers, and can scale to 150% of logical CPUs.
| tqconfig | Configuration structure to initialize |
| void tqPresetManual | ( | TaskQueueConfig * | tqconfig | ) |
void tqPresetManual(TaskQueueConfig *tqconfig)
Initialize a queue config for manual ticking without a thread pool. Queue must be ticked manually with tqTick(). Suitable for integration with existing event loops.
| tqconfig | Configuration structure to initialize |
| void tqPresetMinimal | ( | TaskQueueConfig * | tqconfig | ) |
void tqPresetMinimal(TaskQueueConfig *tqconfig)
Initialize a queue config with minimal presets based on the number of physical cores. Starts with 1 worker, grows to half the physical CPU count when busy. Maximum workers equals the physical CPU count.
| tqconfig | Configuration structure to initialize |
| void tqPresetSingle | ( | TaskQueueConfig * | tqconfig | ) |
void tqPresetSingle(TaskQueueConfig *tqconfig)
Initialize a queue config for a queue with a single worker thread. Suitable for UI threads or other scenarios requiring serial execution.
| tqconfig | Configuration structure to initialize |