pub struct ActorThrottle {
pub steps_per_broadcast: usize,
pub max_lead_steps: usize,
}Expand description
Per-actor staleness throttle derived from
AsyncActorLearnerConfig::actor_throttle.
Policy version v proves the learner has consumed
v * steps_per_broadcast transitions from this actor, so the actor
pauses once steps_sent >= v * steps_per_broadcast + max_lead_steps
and waits for the next broadcast. See
AsyncActorLearnerConfig::max_lead_steps for why the budget is
cumulative.
Fields§
§steps_per_broadcast: usizeEnv steps per actor the learner consumes between successive
policy broadcasts (broadcast_every * num_steps).
max_lead_steps: usizeMaximum steps the actor may run ahead of proven consumption.
0 disables the throttle entirely (unbounded lead — only safe
when the caller guarantees consumption keeps up).
Implementations§
Source§impl ActorThrottle
impl ActorThrottle
Trait Implementations§
Source§impl Clone for ActorThrottle
impl Clone for ActorThrottle
Source§fn clone(&self) -> ActorThrottle
fn clone(&self) -> ActorThrottle
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 moreimpl Copy for ActorThrottle
Auto Trait Implementations§
impl Freeze for ActorThrottle
impl RefUnwindSafe for ActorThrottle
impl Send for ActorThrottle
impl Sync for ActorThrottle
impl Unpin for ActorThrottle
impl UnsafeUnpin for ActorThrottle
impl UnwindSafe for ActorThrottle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more