Python threading tutorial?

Aahz aahz at pythoncraft.com
Sun Jan 5 21:01:57 EST 2003


In article <mailman.1041802930.7347.python-list at python.org>,
Gerrit Holl  <gerrit at nl.linux.org> wrote:
>
>I see. The threading tutorial by Aahz Maruch is not an ideal tutorial to
>read through the web, but page 33 helps me; it says:
>
>mutex.acquire()
><dangerous code>
>mutex.release()
>
>confusingly, those acquire() and release() functions are not in the
>mutex module but Lock() methods; I need to dive deeper in this matter,
>to better understand this Lock()ing... hmm... my code seems to hang
>randomly when adding this... hmm... I'll try and work this out and
>will probably come with a pointed question later this week... hmm...
>studying... hmm... hmm..

Oops.  "mutex" is a standard terminology and because the mutex module
doesn't have anything to do with threading, I wasn't aware of it when I
wrote the tutorial.  Here "mutex" is just a plain instance of a Lock()
object (which is pretty clear in a live setting because page 32
discusses Lock(), but is not so clear just from reading).  Sorry about
that, but you're the first person to hit that confusion (that I'm aware
of).
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"There are three kinds of lies: Lies, Damn Lies, and Statistics."  --Disraeli




More information about the Python-list mailing list