> > 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/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4