diff --git a/src/runtime2/component/control_layer.rs b/src/runtime2/component/control_layer.rs index 2f1c4c9233fb8d9106189fe85002996382ee85e5..9c93bc995682b519124f27f9cc381babc0f2c16a 100644 --- a/src/runtime2/component/control_layer.rs +++ b/src/runtime2/component/control_layer.rs @@ -228,7 +228,7 @@ impl ControlLayer { )); } - pub(crate) fn mark_port_blocked(&mut self, port_id: PortId, comp_ctx: &mut CompCtx) -> (CompId, ControlMessage) { + pub(crate) fn set_port_and_peer_blocked(&mut self, port_id: PortId, comp_ctx: &mut CompCtx) -> (CompId, ControlMessage) { // TODO: Feels like this shouldn't be an entry. Hence this class should // be renamed. Lets see where the code ends up being let entry_id = self.take_id(); @@ -255,7 +255,7 @@ impl ControlLayer { ); } - pub(crate) fn mark_port_unblocked(&mut self, port_id: PortId, comp_ctx: &mut CompCtx) -> (CompId, ControlMessage) { + pub(crate) fn set_port_and_peer_unblocked(&mut self, port_id: PortId, comp_ctx: &mut CompCtx) -> (CompId, ControlMessage) { // Find the entry that contains the blocking entry for the port let mut entry_index = usize::MAX; let mut entry_id = ControlId::new_invalid(); @@ -273,6 +273,7 @@ impl ControlLayer { let peer_port_id = port_info.peer_id; let peer_comp_id = port_info.peer_comp_id; debug_assert_eq!(port_info.state, PortState::Blocked); + debug_assert_eq!(port_info.kind, PortKind::Getter); // because we blocked it because of receiving too many messages port_info.state = PortState::Open; return (