diff --git a/src/runtime2/scheduler.rs b/src/runtime2/scheduler.rs index 44e212f8d94a70c3bcd30bdd64c4cf168ea5433a..19371b8bea7327ad1854c21af335f37ebd077341 100644 --- a/src/runtime2/scheduler.rs +++ b/src/runtime2/scheduler.rs @@ -411,8 +411,12 @@ pub(crate) struct ComponentCtxFancy { // Submitted by the component is_in_sync: bool, changed_in_sync: bool, - outbox: VecDeque, + outbox: VecDeque, state_changes: VecDeque + // Workspaces that may be used by components to (generally) prevent + // allocations. Be a good scout and leave it empty after you've used it. + pub workspace_ports: Vec, + pub workspace_branches: Vec, } pub(crate) enum ReceivedMessage { @@ -478,7 +482,7 @@ impl ComponentCtxFancy { /// Submit a message for the scheduler to send to the appropriate receiver. /// May only be called inside of a sync block. - pub(crate) fn submit_message(&mut self, contents: MessageContents) { + pub(crate) fn submit_message(&mut self, contents: MessageFancy) { debug_assert!(self.is_in_sync); self.outbox.push_back(contents); }