Runtime#

Vortex drives async work on a shared background thread pool. The pool is sized on first use to VORTEX_MAX_THREADS if that environment variable is set to a non-negative integer, otherwise to the number of available CPU cores minus one. Use vortex.set_worker_threads() to adjust the pool at runtime.

set_worker_threads

Set the number of background worker threads driving Vortex futures.

worker_threads

Return the current number of background worker threads.


vortex.set_worker_threads(n=None)#

Set the number of background worker threads driving Vortex futures.

If n is None, resets the pool to available_parallelism() - 1.

vortex.worker_threads()#

Return the current number of background worker threads.