EntropyEngine::Core::Concurrency::WorkContractGroup::ContractSlot
EntropyEngine::Core::Concurrency::WorkContractGroup::ContractSlot
Section titled “EntropyEngine::Core::Concurrency::WorkContractGroup::ContractSlot”Internal storage for a single work contract. More…
Public Attributes
Section titled “Public Attributes”| Name | |
|---|---|
| std::function< void()> | work Work function. |
| std::atomic< ContractState > | state Current lifecycle state. |
| std::atomic< uint32_t > | nextFree Next free slot. |
| std::atomic< uint32_t > | generation Handle validation counter. |
| ExecutionType | executionType Execution context (main/any thread). |
Detailed Description
Section titled “Detailed Description”struct EntropyEngine::Core::Concurrency::WorkContractGroup::ContractSlot;Internal storage for a single work contract.
Each slot represents one work contract and tracks its lifecycle through atomic state transitions. The generation counter prevents use-after-free by invalidating old handles when slots are reused.
Public Attributes Documentation
Section titled “Public Attributes Documentation”variable work
Section titled “variable work”std::function< void()> work;Work function.
variable state
Section titled “variable state”std::atomic< ContractState > state {ContractState::Free};Current lifecycle state.
variable nextFree
Section titled “variable nextFree”std::atomic< uint32_t > nextFree {INVALID_INDEX};Next free slot.
variable generation
Section titled “variable generation”std::atomic< uint32_t > generation {1};Handle validation counter.
variable executionType
Section titled “variable executionType”ExecutionType executionType {ExecutionType::AnyThread};Execution context (main/any thread).
Updated on 2026-01-26 at 17:14:35 -0500