traveler.core.multithread.max_num_threads#
- traveler.core.multithread.max_num_threads(n=-1)[source]#
Set the maximum number of threads to use for multithreading operations.
- Parameters:
n (int | None, optional) – The maximum number of threads to use. If None, it will use the default number of threads for multithreading (probably the number of CPU cores plus 4, capped at 32, see concurrent.futures.ThreadPoolExecutor for details). Passing a negative value will not change the current setting.
- Returns:
The current maximum number of threads set for multithreading operations.
- Return type:
int | None