Skip to content

EntropyEngine::Core::Concurrency::WorkService::Config

EntropyEngine::Core::Concurrency::WorkService::Config

Section titled “EntropyEngine::Core::Concurrency::WorkService::Config”

Configuration parameters for the work service. More…

#include <WorkService.h>

Name
uint32_tthreadCount
Worker thread count - 0 means use all CPU cores.
IWorkScheduler::ConfigschedulerConfig
Configuration passed to scheduler.
size_tmaxSoftFailureCount
Number of times work selection is allowed to fail before sleeping. Yields after every failure.
size_tfailureSleepTime
Sleep duration in nanoseconds when no work found - prevents CPU spinning.
struct EntropyEngine::Core::Concurrency::WorkService::Config;

Configuration parameters for the work service.

These knobs let you tune the service for your specific workload. The defaults work well for general-purpose work distribution, but you might want to adjust them based on your use case.

uint32_t threadCount = 0;

Worker thread count - 0 means use all CPU cores.

IWorkScheduler::Config schedulerConfig;

Configuration passed to scheduler.

size_t maxSoftFailureCount =
5;

Number of times work selection is allowed to fail before sleeping. Yields after every failure.

size_t failureSleepTime = 1;

Sleep duration in nanoseconds when no work found - prevents CPU spinning.


Updated on 2026-01-26 at 17:14:35 -0500