3 ms·
They aren't entirely a non-parallel abstraction. C extension modules can release the GIL[1] and continue calculating. A notable example of this is Numpy/Scipy[2
by dbaupp 14y ago
They aren't entirely a non-parallel abstraction. C extension modules can release the GIL[1] and continue calculating. A notable example of this is Numpy/Scipy[2].
[1]: http://docs.python.org/c-api/init.html#thread-state-and-the-global-interpreter-lock http://docs.python.org/c-api/init.html#thread-state-and-the-...
[2]: http://www.scipy.org/ParallelProgramming#head-9e56edb190bf1ef0863981dcaf22371e1ae8bc7b http://www.scipy.org/ParallelProgramming#head-9e56edb190bf1e...
- Nursie 14y agoTrue, there are options, I guess I was just referring to straight python threads and interpreter calls, not what you can do with extensions. For heavy math workloads, which was what I was thinking of, you can use the techniques you linked to there to great effect. It is something that you need to put a little more thought into than you might in a non-locked situation like pthreads in C though.
- andrewcooke 14y agoalso multiprocessing. but i suspect you were voted down because these days hn favours tribal groupthink (you criticised python) over rational thought.