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§
source§impl 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§
source§impl Clone for ThreadPool
impl Clone for ThreadPool
source§fn clone(&self) -> ThreadPool
fn clone(&self) -> ThreadPool
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more