[PATCH] Make Welcome spoke wait for Geolocation V2

Martin Kolman mkolman at redhat.com
Mon Jul 8 17:33:21 UTC 2013


This is an improved version of the previous waiting patch,
this time without busy waiting altogether. :)

Vratislavs mention of using a Queue got me thinking about the various
Python threading objects that are available and in the end I've settled
on using Condition[1]. This gets rid of the busy waiting, provides a lock
for the "lookup in progress" variable and supports multiple callers
who want to wait for the geolocation lookup to finish.

I've also checked and the GUI correctly displays the waiting cursor while
waiting for the Geolocation lookup to finish (not that it would matter in
most cases, I had to artificially make the lookup take about 30 seconds
to test this :) ).

[1] http://docs.python.org/2/library/threading.html#condition-objects

Martin Kolman (1):
  Make the Welcome spoke wait for Geolocation lookup to finish (#975193)

 pyanaconda/constants.py             |  3 ++
 pyanaconda/geoloc.py                | 69 +++++++++++++++++++++++++++++++++----
 pyanaconda/ui/gui/spokes/welcome.py |  2 +-
 3 files changed, 66 insertions(+), 8 deletions(-)

-- 
1.8.3.1



More information about the anaconda-patches mailing list