Author: bugman Date: Thu Sep 1 11:16:28 2011 New Revision: 14557 URL: http://svn.gna.org/viewcvs/relax?rev=14557&view=rev Log: The relax execution lock now has debugging print outs. Modified: 1.3/status.py Modified: 1.3/status.py URL: http://svn.gna.org/viewcvs/relax/1.3/status.py?rev=14557&r1=14556&r2=14557&view=diff ============================================================================== --- 1.3/status.py (original) +++ 1.3/status.py Thu Sep 1 11:16:28 2011 @@ -200,6 +200,9 @@ # Init a threading.Lock object. self._lock = Lock() + # The status container. + self._status = Status() + # The name and mode of the locker. self._name = None self._mode = None @@ -223,6 +226,10 @@ @keyword mode: The mode of the code trying to obtain the lock. This can be one of 'script' for the scripting interface or 'auto-analysis' for the auto-analyses. @type mode: str """ + + # Debugging. + if self._status.debug: + sys.stdout.write("debug> Execution lock: Acquisition by '%s' ('%s' mode).\n" % (name, mode)) # Do not acquire if lunching a script from a script. if mode == 'script' and self._mode == 'script' and self.locked(): @@ -288,6 +295,10 @@ def release(self): """Simulate the Lock.release() mechanism.""" + # Debugging. + if self._status.debug: + sys.stdout.write("debug> Execution lock: Release by '%s' ('%s' mode).\n" % (self._name, self._mode)) + # Nested scripting. if self._script_nest: # Debugging.