On Mon, 25 Apr 2005 10:46:57 -0700, "Leonard J. Reder" <[EMAIL PROTECTED]> wrote:
Hello Mark,

I took your three day course here at JPL and recall that you said something was wrong with the implementation of threads within Python
but I cannot recall what. So what is wrong with threads in Python?

Nothing is wrong with threads, really. What is often considered wrong is how well the interpreter mainloop can exploit them. There is a single lock (the [G]lobal [I]interpreter [L]ock) which must be acquired to execute any Python bytecode. This effectively serializes most Python programs. Notable exceptions to this include most IO related operations (opening files, reading from sockets, etc), which explicitly release the lock during the actual IO operations, so as to allow other threads to execute Python bytecode while waiting on the disk or the network.

 Jp
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to