MCPcopy Create free account
hub / github.com/NthTensor/Forte / shrink

Method shrink

src/thread_pool.rs:255–259  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls 1

resizeMethod · 0.80

Tested by

no test coverage detected