Author: bugman Date: Mon Aug 8 09:13:22 2011 New Revision: 14245 URL: http://svn.gna.org/viewcvs/relax?rev=14245&view=rev Log: The pipe_lock and spin_lock (via Relax_lock) locks are now reentrant locks. This allows nested locking via one thread, which is necessary as the functions of generic_fns.pipes and generic_fns.mol_res_spin often call functions of the same module in a nested way. Modified: branches/gui_testing/status.py Modified: branches/gui_testing/status.py URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/status.py?rev=14245&r1=14244&r2=14245&view=diff ============================================================================== --- branches/gui_testing/status.py (original) +++ branches/gui_testing/status.py Mon Aug 8 09:13:22 2011 @@ -27,7 +27,7 @@ from Queue import Queue from re import search import sys -from threading import Lock +from threading import Lock, RLock # relax module imports. from relax_errors import RelaxError @@ -66,7 +66,7 @@ self.exec_lock = Exec_lock() # The data pipe lock object. - self.pipe_lock = Lock() + self.pipe_lock = RLock() # The molecule, residue, spin structure lock object. self.spin_lock = Relax_lock() @@ -421,8 +421,8 @@ @type debug: bool """ - # Init a threading.Lock object. - self._lock = Lock() + # Init a reentrant lock object. + self._lock = RLock() # Debugging. self.debug = debug @@ -432,7 +432,7 @@ def acquire(self): - """Simulate the Lock.acquire() mechanism.""" + """Simulate the RLock.acquire() mechanism.""" # Debugging. if self.debug: @@ -457,14 +457,14 @@ def locked(self): - """Simulate the Lock.locked() mechanism.""" + """Simulate the RLock.locked() mechanism.""" # Call the real method. return self._lock.locked() def release(self): - """Simulate the Lock.release() mechanism.""" + """Simulate the RLock.release() mechanism.""" # Debugging. if self.debug: