pub struct BudgetChannel { /* private fields */ }Expand description
Budget channel for cold → hot thread communication.
Cloneable — both the DCC (sender) and Scheduler (receiver) hold clones.
Implementations§
Source§impl BudgetChannel
impl BudgetChannel
Sourcepub fn new(agent_ids: &[AgentId]) -> Self
pub fn new(agent_ids: &[AgentId]) -> Self
Creates a new budget channel with a sender/receiver pair per agent.
Sourcepub fn send(&self, agent_id: AgentId, budget: ResourceBudget)
pub fn send(&self, agent_id: AgentId, budget: ResourceBudget)
Cold thread: sends a budget for an agent. Non-blocking, last wins.
Trait Implementations§
Source§impl Clone for BudgetChannel
impl Clone for BudgetChannel
Source§fn clone(&self) -> BudgetChannel
fn clone(&self) -> BudgetChannel
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BudgetChannel
impl RefUnwindSafe for BudgetChannel
impl Send for BudgetChannel
impl Sync for BudgetChannel
impl Unpin for BudgetChannel
impl UnsafeUnpin for BudgetChannel
impl UnwindSafe for BudgetChannel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more