mailr14199 - /branches/gui_testing/gui/pipe_editor.py


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

Header


Content

Posted by edward on August 06, 2011 - 16:03:
Author: bugman
Date: Sat Aug  6 16:03:17 2011
New Revision: 14199

URL: http://svn.gna.org/viewcvs/relax?rev=14199&view=rev
Log:
The pipe editor window is now acquiring the pipe lock prior to updating its 
contents.

This removes a lot of race conditions, as the pipes can often change which 
the update occurs.


Modified:
    branches/gui_testing/gui/pipe_editor.py

Modified: branches/gui_testing/gui/pipe_editor.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/pipe_editor.py?rev=14199&r1=14198&r2=14199&view=diff
==============================================================================
--- branches/gui_testing/gui/pipe_editor.py (original)
+++ branches/gui_testing/gui/pipe_editor.py Sat Aug  6 16:03:17 2011
@@ -395,6 +395,9 @@
         # First freeze the grid, so that the GUI element doesn't update 
until the end.
         self.grid.Freeze()
 
+        # Acquire the pipe lock.
+        status.pipe_lock.acquire()
+
         # Delete the rows, leaving a single row.
         self.grid.DeleteRows(numRows=self.grid.GetNumberRows()-1)
 
@@ -435,5 +438,8 @@
                 # Cell properties.
                 self.grid.SetReadOnly(i, j)
 
+        # Release the lock.
+        status.pipe_lock.release()
+
         # Unfreeze.
         self.grid.Thaw()




Related Messages


Powered by MHonArc, Updated Sat Aug 06 16:40:02 2011