From: <pj...@us...> - 2008-07-31 23:32:07
|
Revision: 5036 http://jython.svn.sourceforge.net/jython/?rev=5036&view=rev Author: pjenvey Date: 2008-07-31 23:32:03 +0000 (Thu, 31 Jul 2008) Log Message: ----------- support threading._RLock, as twisted uses it fixes #1079 Modified Paths: -------------- branches/asm/Lib/threading.py Modified: branches/asm/Lib/threading.py =================================================================== --- branches/asm/Lib/threading.py 2008-07-31 23:18:33 UTC (rev 5035) +++ branches/asm/Lib/threading.py 2008-07-31 23:32:03 UTC (rev 5036) @@ -52,7 +52,10 @@ global _trace_hook _trace_hook = func -class RLock(object): +def RLock(*args, **kwargs): + return _RLock(*args, **kwargs) + +class _RLock(object): def __init__(self): self._lock = ReentrantLock() self.__owner = None @@ -84,7 +87,7 @@ def _is_owned(self): return self._lock.isHeldByCurrentThread() -Lock = RLock +Lock = _RLock class Condition(object): def __init__(self, lock=None): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |