FLINT3.7.0-dev

flint_get_num_available_threads

Synopsis#include <flint/thread_support.h>
slong flint_get_num_available_threads(void)source

Returns one more than the number of threads of the global pool that are currently available, or flint_get_num_threads() if the pool has not been created.

The count is a snapshot and ignores the worker limit of the calling thread: it can exceed flint_get_num_threads() on a worker thread. The extra 1 counts the calling thread, so flint_get_num_available_threads returns 1 when every thread of the pool is in use.

Cite this page

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