~robru/friends/gschema

Viewing all changes in revision 15.

  • Committer: Robert Bruce Park
  • Date: 2012-10-20 12:50:32 UTC
  • mfrom: (8.4.18 refresh-fixup)
  • Revision ID: robert.park@canonical.com-20121020125032-er6v9f60nd6mu9dg
Workaround for Authentication.login hanging, which was also causing
Dispatcher.Refresh to hang thanks to it's use of thread.join().
Authentication.login was using an extraneous GObject MainLoop for the
purposes of blocking it's thread synchronously until an async callback
got called, but that was a dain bramaged approach because not only
does it interfere with the primary mainloop, but
Signon.AuthSession.process seems to have a bug where the callback
often won't be called, causing the mainloop to block forever.

I've replaced this mainloop with a while loop that calls time.sleep()
a limited number of times. The advantage here is that we have direct
control over how many times time.sleep() gets called and never have to
worry about waiting for a callback that might never come to unblock
us.

This commit also makes sweeping changes to the logging infrastructure,
which were necessary to track down this bug, and generally beneficial,
so they're being included rather than reverted. Logging is now more
verbose, and makes extensive use of the "logging.getLogger(__name__)"
idiom for finer-grained data on which log is coming from where.
debug_live.py also received an overhaul in order to better accommodate
testing.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: