Struct rust_htslib::tpool::ThreadPool
source · [−]pub struct ThreadPool { /* private fields */ }Expand description
An HTSlib thread pool. Create a thread pool and use set_thread_pool() methods
to share a thread pool across multiple BAM readers & writers.
The Rust wrapper holds the htslib thread pool behind a Rc, and a Rc reference
to the thread pool is held by each reader / writer so you don’t need to
explicitly manage the lifetime of the ThreadPool.
Implementations
sourceimpl ThreadPool
impl ThreadPool
sourcepub fn new(n_threads: u32) -> Result<ThreadPool>
pub fn new(n_threads: u32) -> Result<ThreadPool>
Create a new thread pool with n_threads threads.
Trait Implementations
sourceimpl Clone for ThreadPool
impl Clone for ThreadPool
sourcefn clone(&self) -> ThreadPool
fn clone(&self) -> ThreadPool
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
Auto Trait Implementations
impl !RefUnwindSafe for ThreadPool
impl !Send for ThreadPool
impl !Sync for ThreadPool
impl Unpin for ThreadPool
impl !UnwindSafe for ThreadPool
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more