[Python-checkins] python/dist/src/Lib Queue.py,1.16,1.17

Guido van Rossum guido@python.org
Wed, 16 Oct 2002 12:10:30 -0400


> > Hm, I wonder if the threading module should make this 
> > operation (wait for a lock with a timeout) available natively.
> > 
> > Then on some platforms maybe the lock implementation can 
> > support this natively and we can get rid of the silly sleeps there.
> 
> The locks in Queue.py are created using thread.allocate_lock(). The
> aquire on the resulting lock takes an optional timeout... (I'm assuming
> that's portable..? -- at least it works on windows <wink>)

No, the optional argument on acquire() is not a timeout.  It's a
block/noblock flag.

--Guido van Rossum (home page: http://www.python.org/~guido/)