Removes the given number of threads from the thread pool. Returns the new size of the pool. See [`ThreadPool::resize`] for more information about resizing.
(&'static self, terminated_threads: usize)
| 253 | ptr::from_ref(self) as usize |
| 254 | } |
| 255 | |
| 256 | /// Returns the number of members participating in the pool. |
| 257 | #[inline(always)] |
| 258 | pub fn num_members(&'static self) -> usize { |
| 259 | self.claimed_bitmask.load(Ordering::Relaxed).count_ones() as usize |
| 260 | } |
| 261 | |
| 262 | /// Adds a job to the thread-pool's shared queue. |