FLINT3.7.0-dev

thread_pool_wake

Synopsis#include <flint/thread_pool.h>
void thread_pool_wake(thread_pool_t T, thread_pool_handle i, int max_workers, void (*f)(void*), void * a)source

Makes the sleeping thread i run f(a). While running, that thread may itself start at most max_workers further worker threads (it sees flint_get_num_threads() as \mathit{max\_workers} + 1). Pass 0 unless f is itself parallel.

thread_pool_wake returns without waiting; f(a) runs concurrently with the caller until thread_pool_wait is called for i. The thread must have been obtained with thread_pool_request and must be sleeping. max_workers is not checked against the caller's own budget; how to divide a budget between the caller and its workers is explained in Using the thread pool directly.

Guides#

Cite this page

The FLINT team, “thread_pool_wake (thread_pool.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/thread_pool/thread_pool_wake.html (generated 2026-10-20).