pub struct ThreadPoolStatus { /* private fields */ }
Expand description
Represents the status of the thread pool (e.g. size, queued jobs, active jobs).
Status counts use Atomic*
data types in order to be safely shared across workers.
Implementations§
Source§impl ThreadPoolStatus
impl ThreadPoolStatus
pub fn new(size: usize) -> Self
pub fn size(&self) -> usize
pub fn queued(&self) -> usize
pub fn active(&self) -> usize
pub fn inc_queued_count(&self)
pub fn dec_queued_count(&self)
pub fn inc_active_count(&self)
pub fn dec_active_count(&self)
pub fn inc_size(&self)
pub fn dec_size(&self)
Trait Implementations§
Source§impl Clone for ThreadPoolStatus
impl Clone for ThreadPoolStatus
Source§impl IntoPyDict for ThreadPoolStatus
impl IntoPyDict for ThreadPoolStatus
Source§fn into_py_dict(self, py: Python<'_>) -> &PyDict
fn into_py_dict(self, py: Python<'_>) -> &PyDict
Converts self into a
PyDict
object pointer. Whether pointer owned or borrowed
depends on implementation.Auto Trait Implementations§
impl !Freeze for ThreadPoolStatus
impl RefUnwindSafe for ThreadPoolStatus
impl Send for ThreadPoolStatus
impl Sync for ThreadPoolStatus
impl Unpin for ThreadPoolStatus
impl UnwindSafe for ThreadPoolStatus
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