Struct task_exec_queue::TaskExecQueue
source · [−]Implementations
sourceimpl<Tx, G, D> TaskExecQueue<Tx, G, D>where
Tx: Clone + Sink<(D, TaskType)> + Unpin + Send + Sync + 'static,
G: Hash + Eq + Clone + Debug + Send + Sync + 'static,
impl<Tx, G, D> TaskExecQueue<Tx, G, D>where
Tx: Clone + Sink<(D, TaskType)> + Unpin + Send + Sync + 'static,
G: Hash + Eq + Clone + Debug + Send + Sync + 'static,
pub fn try_spawn_with<T>(&self, msg: T, name: D) -> TrySpawner<'_, T, Tx, G, D>ⓘNotable traits for TrySpawner<'_, Item, Tx, G, D>impl<Item, Tx, G, D> Future for TrySpawner<'_, Item, Tx, G, D>where
Item: Future + Send + 'static,
Item::Output: Send + 'static,
Tx: Clone + Unpin + Sink<(D, TaskType)> + Send + Sync + 'static,
G: Hash + Eq + Clone + Debug + Send + Sync + 'static, type Output = Result<(), Error<Item>>;
where
D: Clone,
T: Future + Send + 'static,
T::Output: Send + 'static,
Item: Future + Send + 'static,
Item::Output: Send + 'static,
Tx: Clone + Unpin + Sink<(D, TaskType)> + Send + Sync + 'static,
G: Hash + Eq + Clone + Debug + Send + Sync + 'static, type Output = Result<(), Error<Item>>;
pub fn spawn_with<T>(&self, msg: T, name: D) -> Spawner<'_, T, Tx, G, D>ⓘNotable traits for Spawner<'_, Item, Tx, G, D>impl<Item, Tx, G, D> Future for Spawner<'_, Item, Tx, G, D>where
Item: Future + Send + 'static,
Item::Output: Send + 'static,
Tx: Clone + Unpin + Sink<(D, TaskType)> + Send + Sync + 'static,
G: Hash + Eq + Clone + Debug + Send + Sync + 'static, type Output = Result<(), Error<Item>>;
where
D: Clone,
T: Future + Send + 'static,
T::Output: Send + 'static,
Item: Future + Send + 'static,
Item::Output: Send + 'static,
Tx: Clone + Unpin + Sink<(D, TaskType)> + Send + Sync + 'static,
G: Hash + Eq + Clone + Debug + Send + Sync + 'static, type Output = Result<(), Error<Item>>;
pub fn flush(&self) -> Flush<Tx, D>
pub fn close(&self) -> Close<Tx, D>
pub fn workers(&self) -> usize
pub fn active_count(&self) -> isize
pub fn waiting_count(&self) -> isize
pub fn completed_count(&self) -> isize
pub fn rate(&self) -> f64
pub fn is_full(&self) -> bool
pub fn is_closed(&self) -> bool
pub fn is_flushing(&self) -> bool
sourceimpl<Tx, G> TaskExecQueue<Tx, G, ()>where
Tx: Clone + Sink<((), TaskType)> + Unpin + Send + Sync + 'static,
G: Hash + Eq + Clone + Debug + Send + Sync + 'static,
impl<Tx, G> TaskExecQueue<Tx, G, ()>where
Tx: Clone + Sink<((), TaskType)> + Unpin + Send + Sync + 'static,
G: Hash + Eq + Clone + Debug + Send + Sync + 'static,
pub fn try_spawn<T>(&self, task: T) -> TrySpawner<'_, T, Tx, G, ()>ⓘNotable traits for TrySpawner<'_, Item, Tx, G, D>impl<Item, Tx, G, D> Future for TrySpawner<'_, Item, Tx, G, D>where
Item: Future + Send + 'static,
Item::Output: Send + 'static,
Tx: Clone + Unpin + Sink<(D, TaskType)> + Send + Sync + 'static,
G: Hash + Eq + Clone + Debug + Send + Sync + 'static, type Output = Result<(), Error<Item>>;
where
T: Future + Send + 'static,
T::Output: Send + 'static,
Item: Future + Send + 'static,
Item::Output: Send + 'static,
Tx: Clone + Unpin + Sink<(D, TaskType)> + Send + Sync + 'static,
G: Hash + Eq + Clone + Debug + Send + Sync + 'static, type Output = Result<(), Error<Item>>;
pub fn spawn<T>(&self, task: T) -> Spawner<'_, T, Tx, G, ()>ⓘNotable traits for Spawner<'_, Item, Tx, G, D>impl<Item, Tx, G, D> Future for Spawner<'_, Item, Tx, G, D>where
Item: Future + Send + 'static,
Item::Output: Send + 'static,
Tx: Clone + Unpin + Sink<(D, TaskType)> + Send + Sync + 'static,
G: Hash + Eq + Clone + Debug + Send + Sync + 'static, type Output = Result<(), Error<Item>>;
where
T: Future + Send + 'static,
T::Output: Send + 'static,
Item: Future + Send + 'static,
Item::Output: Send + 'static,
Tx: Clone + Unpin + Sink<(D, TaskType)> + Send + Sync + 'static,
G: Hash + Eq + Clone + Debug + Send + Sync + 'static, type Output = Result<(), Error<Item>>;
Trait Implementations
Auto Trait Implementations
impl<Tx = Sender<((), Box<dyn Future<Output = ()> + Send + Unpin + 'static, Global>)>, G = (), D = ()> !RefUnwindSafe for TaskExecQueue<Tx, G, D>
impl<Tx, G, D> Send for TaskExecQueue<Tx, G, D>where
D: Send,
G: Send + Sync,
Tx: Send,
impl<Tx, G, D> Sync for TaskExecQueue<Tx, G, D>where
D: Sync,
G: Send + Sync,
Tx: Sync,
impl<Tx, G, D> Unpin for TaskExecQueue<Tx, G, D>where
D: Unpin,
Tx: Unpin,
impl<Tx = Sender<((), Box<dyn Future<Output = ()> + Send + Unpin + 'static, Global>)>, G = (), D = ()> !UnwindSafe for TaskExecQueue<Tx, G, D>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more