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 moreAuto Trait Implementations§
impl Freeze for ThreadPool
impl !RefUnwindSafe for ThreadPool
impl !Send for ThreadPool
impl !Sync for ThreadPool
impl Unpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)