On Mon, Feb 10, 2003, Bernhard Herzog wrote: > > In the particular case of locks, the threading.Lock object's release > method must only be called when it's locked (same for the other lock > objects AFAICT). Seems to me that this would require a flag at the > python level and then you have the race condition. That's not a problem for threading.RLock(). You can code that as lock = threading.RLock() try: lock.acquire() finally: lock.release() Note that currently there's an AssertionError in threading when you do that; perhaps that should be changed to a Warning? -- Aahz (aahz@pythoncraft.com) <*> http://www.pythoncraft.com/ Register for PyCon now! http://www.python.org/pycon/reg.html
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