qb
2.0.0.0
C++17 Actor Framework
|
Manages a virtual processing core (worker thread) in the actor system. More...
#include <VirtualCore.h>
Public Types | |
enum | Error : uint64_t { BadInit = (1u << 9u) , NoActor = (1u << 10u) , BadActorInit = (1u << 11u) , ExceptionThrown = (1u << 12u) } |
Error codes for virtual core operations and states. These flags can be combined to represent multiple error conditions. More... |
Public Member Functions | |
VirtualCore ()=delete | |
Event Api. | |
CoreId | getIndex () const noexcept |
Get the core's index. | |
const CoreIdSet & | getCoreSet () const noexcept |
Get the set of cores this VirtualCore is configured to communicate with. | |
uint64_t | time () const noexcept |
Get the current cached time for this VirtualCore's processing loop. |
Manages a virtual processing core (worker thread) in the actor system.
A VirtualCore is responsible for executing actors assigned to it. It runs an event loop that processes incoming events for its actors, manages actor lifecycles (initialization, termination), and handles inter-core communication by dispatching events to and from other VirtualCores via mailboxes. Each VirtualCore typically runs in its own dedicated thread.