News for hackers. Stuff that matters.
Re:The multiprocessing module in Python by ddorian43 on Friday February 03, 2017 @04:55PM (#13563675)
It's still 1 core for multithreading (on the python part).
Re:The multiprocessing module in Python by gshulegaard on Friday February 03, 2017 @07:20PM (#13564635)
Just to add more context for others...

C extensions called from Python are still subject to the GIL of the calling interpreter[1].

In fact, this guaranteed thread safety has led to the creation of many non-thread safe Python C extensions which is now a critical blocker to efforts to removing the GIL[2], although there are also a number of other issues as well.

As noted in the StackOverflow, you can release the GIL but there are some tricks to doing so safely[3].

But threads of a C extensions library are not necessarily pinned to a single core by the GIL like regular Python byte code.

Although many performance oriented libraries like numpy[4] forsake multi-threading by default in many cases and rely on parallelization by the user (programmer)[5].

[1] http://stackoverflow.com/questions/651048/concurrency-are-py...

[2] https://youtu.be/P3AyI_u66Bw

[3] https://docs.python.org/3/c-api/init.html#thread-state-and-t...

[4] http://www.numpy.org/

[5] http://stackoverflow.com/questions/16617973/why-isnt-numpy-m...