[rhel7/master] Wait for other threads to finish before sending ready (#1075103)

Brian C. Lane bcl at redhat.com
Fri Mar 14 00:13:48 UTC 2014


More threading fallout. In _initialize we set self._ready and send the
hub the spoke ready message. But some of the other threads may not be
quite done when the hub processes the message so it doesn't set the
Source spoke sensitive. And it stays that way until another spoke is
visited and _updateCompleteness is called on all the spokes.

This adds a loop at the end of the _initialize thread to make sure
self.ready will really be true when the hub gets the source spoke's
ready message.

Resolves: rhbz#1075103
---
 pyanaconda/ui/gui/spokes/source.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py
index 59ff82c..3fa3234 100644
--- a/pyanaconda/ui/gui/spokes/source.py
+++ b/pyanaconda/ui/gui/spokes/source.py
@@ -646,6 +646,10 @@ class SourceSpoke(NormalSpoke):
         # FIXME
 
         self._ready = True
+        # Wait to make sure the other threads are done before sending ready, otherwise
+        # the spoke may not get be sensitive by _handleCompleteness in the hub.
+        while not self.ready:
+            time.sleep(1)
         hubQ.send_ready(self.__class__.__name__, False)
 
     def refresh(self):
-- 
1.8.5.3



More information about the anaconda-patches mailing list