diff --git a/src/runtime2/mod.rs b/src/runtime2/mod.rs index 04b3ae6015e1ecb90d14256a31ec060c1847d2bc..ea8d309c8d8839233385c2fb61efec3fdcfa794a 100644 --- a/src/runtime2/mod.rs +++ b/src/runtime2/mod.rs @@ -29,7 +29,7 @@ use connector2::{ConnectorPDL, ConnectorPublic, ConnectorScheduling}; use scheduler::{Scheduler, ControlMessageHandler}; use native::{Connector, ConnectorApplication, ApplicationInterface}; use crate::runtime2::inbox2::MessageFancy; -use crate::runtime2::port::{Port, PortState}; +use crate::runtime2::port::{ChannelId, Port, PortState}; use crate::runtime2::scheduler::{ComponentCtxFancy, SchedulerCtx}; /// A kind of token that, once obtained, allows mutable access to a connector. @@ -222,12 +222,14 @@ impl RuntimeInner { use port::{PortIdLocal, PortKind}; let getter_id = self.port_counter.fetch_add(2, Ordering::SeqCst); + let channel_id = ChannelId::new(getter_id); let putter_id = PortIdLocal::new(getter_id + 1); let getter_id = PortIdLocal::new(getter_id); let getter_port = Port{ self_id: getter_id, peer_id: putter_id, + channel_id, kind: PortKind::Getter, state: PortState::Open, peer_connector: creating_connector, @@ -235,6 +237,7 @@ impl RuntimeInner { let putter_port = Port{ self_id: putter_id, peer_id: getter_id, + channel_id, kind: PortKind::Putter, state: PortState::Open, peer_connector: creating_connector,