[Python-checkins] python/dist/src/Lib Queue.py,1.16,1.17
Bjorn Pettersen
BPettersen@NAREX.com
2002年10月16日 10:00:13 -0600
> From: Guido van Rossum [mailto:guido@python.org]=20
[snip Queue.py change]
>=20
> Hm, I wonder if the threading module should make this=20
> operation (wait for a lock with a timeout) available natively.
>=20
> Then on some platforms maybe the lock implementation can=20
> 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>)
-- bjorn