mailr14535 - /1.3/status.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on August 31, 2011 - 11:04:
Author: bugman
Date: Wed Aug 31 11:04:03 2011
New Revision: 14535

URL: http://svn.gna.org/viewcvs/relax?rev=14535&view=rev
Log:
Renamed the Relax_lock debug arg to fake_lock.

Again this is used to fake the locking mechanism, whereas debugging could be 
more fine grained.


Modified:
    1.3/status.py

Modified: 1.3/status.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/status.py?rev=14535&r1=14534&r2=14535&view=diff
==============================================================================
--- 1.3/status.py (original)
+++ 1.3/status.py Wed Aug 31 11:04:03 2011
@@ -417,21 +417,21 @@
 class Relax_lock:
     """A type of locking object for relax."""
 
-    def __init__(self, name=None, debug=False):
+    def __init__(self, name=None, fake_lock=False):
         """Set up the lock-like object.
 
-        @keyword name:  The special name for the lock, used in debugging.
-        @type name:     str
-        @keyword debug: A flag which is True will allow this object to be 
debugged as the locking mechanism is turned off.
-        @type debug:    bool
+        @keyword name:      The special name for the lock, used in debugging.
+        @type name:         str
+        @keyword fake_lock: A flag which is True will allow this object to 
be debugged as the locking mechanism is turned off.
+        @type fake_lock:    bool
         """
 
         # Init a reentrant lock object.
         self._lock = RLock()
 
         # Debugging.
-        self.debug = debug
-        if self.debug:
+        self.fake_lock = fake_lock
+        if self.fake_lock:
             # Track the number of acquires.
             self._lock_level = 0
 
@@ -440,7 +440,7 @@
         """Simulate the RLock.acquire() mechanism."""
 
         # Debugging.
-        if self.debug:
+        if self.fake_lock:
             # Write out.
             sys.stderr.write('Acquire')
 
@@ -472,7 +472,7 @@
         """Simulate the RLock.release() mechanism."""
 
         # Debugging.
-        if self.debug:
+        if self.fake_lock:
             # Write out.
             sys.stderr.write('Release')
 




Related Messages


Powered by MHonArc, Updated Wed Aug 31 12:20:03 2011