Just use "ThreadPoolExecutor" with a Context Manager, see here: https://docs.python.org/3/library/concurrent.futures.html
Quote:
CodeIf max_workers is None or not given, it will default to the number of processors on the machine, multiplied by 5, assuming that https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.ThreadPoolExecutor is often used to overlap I/O instead of CPU work and the number of workers should be higher than the number of workers for https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.ProcessPoolExecutor.
Is it a problem when i create threads inside a thread
Like i have a site for example and i want to scrape multiple querys at once and create a thread for each query?
Is the ThreadPoolExecutor better than the ThreadPool?