Struct garage_util::background::BackgroundRunner
source · pub struct BackgroundRunner { /* private fields */ }
Expand description
Job runner for futures and async functions
Implementations§
source§impl BackgroundRunner
impl BackgroundRunner
sourcepub fn new(stop_signal: Receiver<bool>) -> (Arc<Self>, JoinHandle<()>)
pub fn new(stop_signal: Receiver<bool>) -> (Arc<Self>, JoinHandle<()>)
Create a new BackgroundRunner
pub fn get_worker_info(&self) -> HashMap<usize, WorkerInfo>
pub fn spawn_worker<W>(&self, worker: W)where
W: Worker + 'static,
Auto Trait Implementations§
impl Freeze for BackgroundRunner
impl !RefUnwindSafe for BackgroundRunner
impl Send for BackgroundRunner
impl Sync for BackgroundRunner
impl Unpin for BackgroundRunner
impl !UnwindSafe for BackgroundRunner
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