flint_set_num_workers, flint_reset_num_workers
Synopsis
#include <flint/thread_support.h>int flint_set_num_workers(int num_workers)sourcevoid flint_reset_num_workers(int num_workers)sourceTemporarily lowers the number of workers the calling thread may start to num_workers (a larger value has no effect), and restores it. flint_set_num_workers returns the previous value, which must be passed to flint_reset_num_workers before the thread finishes its work.
Guides#
- Using the thread pool directly (
thread_pool)
Cite this page
The FLINT team, “flint_set_num_workers, flint_reset_num_workers (thread_support.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/thread_support/flint_set_num_workers.html (generated 2026-10-20).
@misc{flint-doc-thread-support-flint-set-num-workers,
author = {{The FLINT team}},
title = {{flint\_set\_num\_workers, flint\_reset\_num\_workers (thread\_support.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/thread_support/flint_set_num_workers.html},
note = {Generated 2026-10-20}
}