diff --git a/src/runtime2/inbox.rs b/src/runtime2/inbox.rs index 2d64dd23404f8dea01d3441b5adc99902eaba789..022ab16496f3aa2ab43511267f73f022916e8654 100644 --- a/src/runtime2/inbox.rs +++ b/src/runtime2/inbox.rs @@ -42,6 +42,29 @@ pub struct DataMessage { pub message: ValueGroup, } +pub enum SyncBranchConstraint { + SilentPort(PortIdLocal), + BranchNumber(u32), + PortMapping(PortIdLocal, u32), +} + +pub struct SyncConnectorSolution { + connector_id: ConnectorId, + terminating_branch_id: BranchId, + execution_branch_ids: Vec, // ends with terminating branch ID +} + +pub struct SyncConnectorConstraints { + connector_id: ConnectorId, + constraints: Vec, +} + +pub struct SyncMessage { + connector_solutions: Vec, + connector_constraints: Vec, + connectors_to_visit: Vec, +} + /// A control message. These might be sent by the scheduler to notify eachother /// of asynchronous state changes. pub struct ControlMessage { @@ -59,8 +82,10 @@ pub enum ControlMessageVariant { /// out and handles all control message and potential routing). The correctly /// addressed `Data` variants will end up at the connector. pub enum Message { - Data(DataMessage), - Control(ControlMessage), + Data(DataMessage), // data message, handled by connector + Sync(SyncMessage), // sync message, handled by both connector/scheduler + Control(ControlMessage), // control message, handled by scheduler + Ping, // ping message, intentionally waking up a connector (used for native connectors) } /// The public inbox of a connector. The thread running the connector that owns