pub struct TimeoutExecutor { /* private fields */ }
Expand description
TimeoutExecutor
is a Executor
with a timeout queue.
TimeoutExecutor
is used in the same way as Executor
,
for more information, see doc Executor
.
Implementations§
Source§impl TimeoutExecutor
impl TimeoutExecutor
Sourcepub fn new_with_thread_count(thread_count: usize) -> Self
pub fn new_with_thread_count(thread_count: usize) -> Self
New a TimeoutExecutor
with [thread_count
].
Sourcepub fn new_with_thread_count_and_timeout(
thread_count: usize,
timeout: Instant,
) -> Self
pub fn new_with_thread_count_and_timeout( thread_count: usize, timeout: Instant, ) -> Self
New a TimeoutExecutor
with [thread_count
] and [timeout
].
Trait Implementations§
Source§impl Executor for TimeoutExecutor
impl Executor for TimeoutExecutor
Source§fn concurrency_capacity(&self) -> usize
fn concurrency_capacity(&self) -> usize
The count for threads.
Auto Trait Implementations§
impl Freeze for TimeoutExecutor
impl RefUnwindSafe for TimeoutExecutor
impl Send for TimeoutExecutor
impl Sync for TimeoutExecutor
impl Unpin for TimeoutExecutor
impl UnwindSafe for TimeoutExecutor
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