chronon::sender::IArbitratablePort
#include <Port.hpp>
Inherited by chronon::sender::InPort< T >
Public Functions
| Name | |
|---|---|
| virtual | ~IArbitratablePort() =default |
| virtual void | setArbitrationProgressPointers(std::vector< const std::atomic< uint64_t > * > ptrs) =0 |
| virtual void | arbitrateMPSCConsumerDriven() |
| virtual void | arbitrateMPSC() =0 |
| virtual void * | arbitratablePortKey() =0 |
Detailed Description
class chronon::sender::IArbitratablePort;
IArbitratablePort - Type-erased interface exposing the per-cycle MPSC arbitration hook to the TickSimulation scheduler.
Only InPorts that have at least one MPSC connection registered implement meaningful behavior; other ports can ignore. TickSimulation keeps a flat list of ports that declared MPSC interest during initialize() and calls arbitrateMPSC() on each at every cycle boundary (sequential tick loop, executeEpochBarrier sync_wait, or the progress-based lookahead scheduler's epoch-end flush).
Public Functions Documentation
function ~IArbitratablePort
virtual ~IArbitratablePort() =default
function setArbitrationProgressPointers
virtual void setArbitrationProgressPointers(
std::vector< const std::atomic< uint64_t > * > ptrs
) =0
Reimplemented by: chronon::InPort::setArbitrationProgressPointers, chronon::sender::InPort::setArbitrationProgressPointers
Install the predecessor-thread completed_cycle atomics for consumer-tick-driven arbitration. Called once during TickSimulation::initialize() for the lookahead scheduler. Ignored if empty or if the port has no MPSC connections.
function arbitrateMPSCConsumerDriven
inline virtual void arbitrateMPSCConsumerDriven()
Reimplemented by: chronon::InPort::arbitrateMPSCConsumerDriven, chronon::sender::InPort::arbitrateMPSCConsumerDriven
Cycle-bounded arbitration for consumer-tick-driven execution (see docs/mpsc-atomic-publish.md). The owning InPort computes S = min over producer clusters of completed_cycle.load(acquire) and drains only entries with enqueue_cycle <= S, in conn_id order. A no-op if the port has no MPSC connections or if S has not advanced since the last arbitration.
Default implementation calls arbitrateMPSC() — safe fallback for ports that don't need the bounded variant.
function arbitrateMPSC
virtual void arbitrateMPSC() =0
Reimplemented by: chronon::InPort::arbitrateMPSC, chronon::sender::InPort::arbitrateMPSC
Drain every staged entry whose epoch matches. Called at scheduler sync points (Sequential per-cycle, Barrier sync_wait, lookahead epoch-end flush) where every producer has finished its cycle.
function arbitratablePortKey
virtual void * arbitratablePortKey() =0
Reimplemented by: chronon::InPort::arbitratablePortKey, chronon::sender::InPort::arbitratablePortKey
Opaque identity for this arbitrable port. Returned by InPort as its this pointer (same value as destPortPtr() on connections). Used by TickSimulation to join MPSC InPorts against per-port producer- thread tables at init time.
Updated on 2026-05-26 at 05:42:32 +0000