pub struct ThreadPool { /* private fields */ }Implementations§
Source§impl ThreadPool
impl ThreadPool
pub fn new( name: &str, num_threads: usize, affinity: Vec<usize>, priority: i32, ) -> Self
pub fn name(&self) -> &str
pub fn num_threads(&self) -> usize
pub fn affinity(&self) -> &[usize]
pub fn priority(&self) -> i32
Sourcepub fn start(&self, graph: Weak<GraphInner>)
pub fn start(&self, graph: Weak<GraphInner>)
拉起工作线程。必须在 Arc<GraphInner> 已存在之后调用。
pub fn submit_source_wake( &self, node: NodeId, generation: u64, delay: Duration, ) -> bool
pub fn pending(&self) -> usize
pub fn clear_delayed(&self)
pub fn reset_stats(&self)
Trait Implementations§
Source§impl Drop for ThreadPool
impl Drop for ThreadPool
Auto Trait Implementations§
impl !Freeze for ThreadPool
impl RefUnwindSafe for ThreadPool
impl Send for ThreadPool
impl Sync for ThreadPool
impl Unpin for ThreadPool
impl UnsafeUnpin for ThreadPool
impl UnwindSafe for ThreadPool
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