[EMAIL PROTECTED] > is treated as a boolean or as a number. > > Running on Windows, I get two different behaviors from > the following calls to acquire: > > aLock = threading.Lock() > ... > > # Thread 0 > # This one often succeeds > aLock.acquire(1) > ... > > # Thread 1 > # When this one would fail in a different thread > aLock.acquire(2) > > but the behaviors aren't what I would expect if waitflag > were a timeout value.
It's a Windows bug, fixed a while ago but not yet in a released Python; here's the bug report: http://www.python.org/sf/1234979 2 _should_ have exactly the same effect as 1, but didn't on Windows. > If the argument to acquire is a true/false flag, the > behaviors for values of 1 and 2 ought to be the same. Right, that's the intent. > ... -- http://mail.python.org/mailman/listinfo/python-list