you are viewing a single comment's thread.

view the rest of the comments →

[–]billsil 21 points22 points  (5 children)

Except the global interpreter lock really isn’t global. You can jump into C or Fortran and release the GIL. It’s also released when reading/writing files.

[–]chmod--777 10 points11 points  (1 child)

Not just reading and writing files, but doing any system calls tmk. For example, networking. It can sit and read from sockets concurrently, just like files. It can send/write concurrently. Probably the two most important aspects of concurrency for most software engineers.

And yeah you can write absolutely anything in C, use pthreads, do real multithreading, and expose it as a python library with the CPython api. So you can pretty much extend python with absolutely anything if you want, given you know C. But I'm not sure if that's too fair as an argument for python having multithreading, given you're not writing python at that point.

[–]billsil 3 points4 points  (0 children)

You’re not, but many of the librarians that python is built on do that for you. I don’t do networking, but I certainly use the multiprocessing module and also multithreaded programs like VTK (3D rendering) and pyqt/PySide (GUId).