Struct async_lib::AsyncRuntimeManager
source · pub struct AsyncRuntimeManager {
pub(crate) rt_type: RuntimeType,
pub(crate) last_used_rt: AtomicUsize,
pub(crate) runtimes: Vec<Arc<Runtime>>,
pub(crate) _runtime_threads: Vec<JoinHandle<()>>,
}Fields§
§rt_type: RuntimeType§last_used_rt: AtomicUsize§runtimes: Vec<Arc<Runtime>>§_runtime_threads: Vec<JoinHandle<()>>Implementations§
source§impl AsyncRuntimeManager
impl AsyncRuntimeManager
pub fn new(config: &Config, num_executor_threads: usize) -> Self
pub(crate) fn pick_rt(&self) -> Arc<Runtime>
pub(crate) fn pick_rt_any(&self) -> Arc<Runtime>
pub fn block_on<F: Future>(&self, future: F) -> F::Output
pub fn spawn<F>(&self, future: F) -> TokioJoinHandle<F::Output>where F: Future + Send + 'static, F::Output: Send + 'static,
pub fn spawn_any<F>(&self, future: F) -> TokioJoinHandle<F::Output>where F: Future + Send + 'static, F::Output: Send + 'static,
pub fn runtime_iter(&self) -> Iter<'_, Arc<Runtime>>
Auto Trait Implementations§
impl !RefUnwindSafe for AsyncRuntimeManager
impl Send for AsyncRuntimeManager
impl Sync for AsyncRuntimeManager
impl Unpin for AsyncRuntimeManager
impl !UnwindSafe for AsyncRuntimeManager
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