Thread cache, to re-use threads.
authorClaudio-Daniel Freire <claudio-daniel.freire@inria.fr>
Wed, 17 Aug 2011 12:07:37 +0000 (14:07 +0200)
committerClaudio-Daniel Freire <claudio-daniel.freire@inria.fr>
Wed, 17 Aug 2011 12:07:37 +0000 (14:07 +0200)
commit5d52c3f960d8d120e5d3b4f5bf63ff6f2bb226cc
tree3c945dc86292fa91be4f76f3e37840997adb18dc
parentd6f12ebd56bf2f9c8e04d9b78b7e7ea6dbf9452c
Thread cache, to re-use threads.
It so happens that the per-user process limit includes DEAD threads, which is nonsense, but it does.
Maybe python doesn't clean up properly, but whatever the reason, there is a limit even in nonconcurrent threads created.
To mitigate that, a thread cache is used in the parallel module to avoid creating thousands of threads and reaching that limit.
src/nepi/util/parallel.py