How to limit number of threads for python interpreter?

I want to know whether it is possible to limit the number of threads python interpreter can spawn when running a script.

I am not using threading myself, but my script uses modules like pandas, numpy, and others which I assume would be using threading in the background. The script works fine, but when I run it on an LSF cluster, it spawns too many threads crossing thread limit per job (for the cluster) and as a result, crashes.

I would like to restrict the python interpreter to not allow more than,...

Read More »

By: StackOverFlow - 6 days ago

Related Posts