4 ms·
I'm 99% sure threads will run on all cores. I think the author has confused multithreading with hyperthreading.
by jwandborg 7y ago
I'm 99% sure threads will run on all cores. I think the author has confused multithreading with hyperthreading.
- jdnier 7y agoI was never sure about that, thinking that a single interpreter process runs on one core and the threads must share that process space. But you're right, and I found good confirmation in this visualization (see the "code" link also): http://www.dabeaz.com/GIL/gilvis/fourthread.html http://www.dabeaz.com/GIL/gilvis/fourthread.html See also http://www.dabeaz.com/python/UnderstandingGIL.pdf http://www.dabeaz.com/python/UnderstandingGIL.pdf, which explains that • Python threads are real system threads • POSIX threads (pthreads) • Windows threads • Fully managed by the host operating system • Represent threaded execution of the Python interpreter process (written in C)
- _joe 7y agoThe article is full of inaccuracies and errors. Confusing threads with eventloops is just one of them. I can't imagine it's being upvoted.