Struct stress_test::actor::ActorRunner
source · pub struct ActorRunner {
pub name: String,
pub delay: Option<Duration>,
pub actor: Arc<Mutex<dyn Actor>>,
}
Expand description
The thread that runs an actor indefinitely
Fields§
§name: String
§delay: Option<Duration>
§actor: Arc<Mutex<dyn Actor>>
Implementations§
source§impl ActorRunner
impl ActorRunner
pub fn new<A: Actor>( name: impl ToString, delay: Option<Duration>, actor: Arc<Mutex<A>>, ) -> Self
sourcepub fn run(
self,
counter_tx: UnboundedSender<String>,
generation: u64,
) -> (Task<Result<(ActorRunner, u64), Aborted>>, AbortHandle)
pub fn run( self, counter_tx: UnboundedSender<String>, generation: u64, ) -> (Task<Result<(ActorRunner, u64), Aborted>>, AbortHandle)
Run the actor in a new task indefinitely for the given generation. The runner will stop if the actor requests an environment reset. The amount of parallelism is determined by the caller’s executor.
Trait Implementations§
source§impl Clone for ActorRunner
impl Clone for ActorRunner
source§fn clone(&self) -> ActorRunner
fn clone(&self) -> ActorRunner
Returns a copy of the value. Read more
1.0.0 · 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 ActorRunner
impl !RefUnwindSafe for ActorRunner
impl Send for ActorRunner
impl Sync for ActorRunner
impl Unpin for ActorRunner
impl !UnwindSafe for ActorRunner
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)