EntropyEngine::Core::Concurrency::AdaptiveRankingScheduler::ThreadState
EntropyEngine::Core::Concurrency::AdaptiveRankingScheduler::ThreadState
Section titled “EntropyEngine::Core::Concurrency::AdaptiveRankingScheduler::ThreadState”Per-thread state for adaptive scheduling. More…
Public Functions
Section titled “Public Functions”| Name | |
|---|---|
| void | reset() |
Public Attributes
Section titled “Public Attributes”| Name | |
|---|---|
| size_t | rankingUpdateCounter Counts work done since last ranking update. |
| std::vector< WorkContractGroup * > | rankedGroups Thread-local group priority ordering. |
| uint64_t | lastSeenGeneration Generation counter for detecting group list changes. |
| size_t | currentGroupIndex Current position in rankedGroups (thread affinity position). |
| size_t | consecutiveExecutionCount Number of consecutive executions on current group. |
Detailed Description
Section titled “Detailed Description”struct EntropyEngine::Core::Concurrency::AdaptiveRankingScheduler::ThreadState;Per-thread state for adaptive scheduling.
This structure enables scheduling by maintaining thread-local copies of rankings and affinity state. The design eliminates locks, atomics, and contention between threads. Synchronization occurs only when the group list changes or during periodic rebalancing operations.
The rankedGroups vector represents each thread’s independent priority ordering. Rankings update based on thread-local observations, which may differ slightly between threads. This variance helps prevent thundering herd effects during work distribution.
Public Functions Documentation
Section titled “Public Functions Documentation”function reset
Section titled “function reset”inline void reset()Public Attributes Documentation
Section titled “Public Attributes Documentation”variable rankingUpdateCounter
Section titled “variable rankingUpdateCounter”size_t rankingUpdateCounter = 0;Counts work done since last ranking update.
variable rankedGroups
Section titled “variable rankedGroups”std::vector< WorkContractGroup * > rankedGroups;Thread-local group priority ordering.
variable lastSeenGeneration
Section titled “variable lastSeenGeneration”uint64_t lastSeenGeneration = 0;Generation counter for detecting group list changes.
variable currentGroupIndex
Section titled “variable currentGroupIndex”size_t currentGroupIndex = 0;Current position in rankedGroups (thread affinity position).
variable consecutiveExecutionCount
Section titled “variable consecutiveExecutionCount”size_t consecutiveExecutionCount = 0;Number of consecutive executions on current group.
Updated on 2026-01-26 at 17:14:35 -0500