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 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto 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 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