pub struct SingleThreadDispatcher { /* private fields */ }Expand description
Single-thread dedicated runtime, similar to PinnedDispatcher but
expressing the semantic role of “one shared single-threaded runtime
for a group of actors that must not run concurrently with each
other”. The pin variant gives
each actor its own runtime; this variant shares one across actors.
Implementations§
Source§impl SingleThreadDispatcher
impl SingleThreadDispatcher
pub fn new(config: DispatcherConfig) -> Result<Self>
Trait Implementations§
Source§impl Dispatcher for SingleThreadDispatcher
impl Dispatcher for SingleThreadDispatcher
fn spawn_task(&self, task: BoxFuture<'static, ()>) -> DispatcherHandle
fn throughput(&self) -> u32
Source§fn throughput_deadline(&self) -> Option<Duration>
fn throughput_deadline(&self) -> Option<Duration>
None is unbounded.Auto Trait Implementations§
impl Freeze for SingleThreadDispatcher
impl RefUnwindSafe for SingleThreadDispatcher
impl Send for SingleThreadDispatcher
impl Sync for SingleThreadDispatcher
impl Unpin for SingleThreadDispatcher
impl UnsafeUnpin for SingleThreadDispatcher
impl UnwindSafe for SingleThreadDispatcher
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