EntropyEngine::Core::Concurrency::WorkGraphEvent
EntropyEngine::Core::Concurrency::WorkGraphEvent
Section titled “EntropyEngine::Core::Concurrency::WorkGraphEvent”The mother of all WorkGraph events - timestamp and source. More…
#include <WorkGraphEvents.h>
Inherited by EntropyEngine::Core::Concurrency::DependencyAddedEvent, EntropyEngine::Core::Concurrency::DependencyResolvedEvent, EntropyEngine::Core::Concurrency::GraphExecutionCompletedEvent, EntropyEngine::Core::Concurrency::GraphExecutionStartedEvent, EntropyEngine::Core::Concurrency::GraphStatsEvent, EntropyEngine::Core::Concurrency::NodeAddedEvent, EntropyEngine::Core::Concurrency::NodeCancelledEvent, EntropyEngine::Core::Concurrency::NodeCompletedEvent, EntropyEngine::Core::Concurrency::NodeDeferredEvent, EntropyEngine::Core::Concurrency::NodeExecutingEvent, EntropyEngine::Core::Concurrency::NodeFailedEvent, EntropyEngine::Core::Concurrency::NodeReadyEvent, EntropyEngine::Core::Concurrency::NodeScheduledEvent, EntropyEngine::Core::Concurrency::NodeStateChangedEvent
Public Functions
Section titled “Public Functions”| Name | |
|---|---|
| WorkGraphEvent(const WorkGraph * g) |
Public Attributes
Section titled “Public Attributes”| Name | |
|---|---|
| std::chrono::steady_clock::time_point | timestamp When this event was created. |
| const WorkGraph * | graph Which graph emitted this event. |
Detailed Description
Section titled “Detailed Description”struct EntropyEngine::Core::Concurrency::WorkGraphEvent;The mother of all WorkGraph events - timestamp and source.
Every event carries these two essential pieces of information: when it happened and which graph it came from. The timestamp uses steady_clock for reliable duration measurements even if the system clock changes.
Minimal overhead design.
// All events inherit from this, so you can handle them genericallyeventBus->subscribe<WorkGraphEvent>([](const WorkGraphEvent& event) { auto elapsed = std::chrono::steady_clock::now() - event.timestamp; LOG_DEBUG("Event from graph {} occurred {}ms ago", event.graph, std::chrono::duration_cast<std::chrono::milliseconds>(elapsed).count());});Public Functions Documentation
Section titled “Public Functions Documentation”function WorkGraphEvent
Section titled “function WorkGraphEvent”inline explicit WorkGraphEvent( const WorkGraph * g)Public Attributes Documentation
Section titled “Public Attributes Documentation”variable timestamp
Section titled “variable timestamp”std::chrono::steady_clock::time_point timestamp;When this event was created.
variable graph
Section titled “variable graph”const WorkGraph * graph;Which graph emitted this event.
Updated on 2026-01-26 at 17:14:35 -0500