Commit 7088fbaf authored by Philip Withnall's avatar Philip Withnall

telepathy: Call continuations in idle callbacks rather than directly

The continuations will proceed to a g_simple_async_result_complete() call,
rather than a g_simple_async_result_complete_in_idle() call as I expected
(and didn’t check). This could result in the first continuation executing
a lot of code and starving the other continuations (and the original
prepare() call). By delaying the continuations to the idle queue, the
original prepare() call is guaranteed to finish first. Then the
continuations can only starve each other.

See: https://bugzilla.gnome.org/show_bug.cgi?id=677633
parent b3a39598
...@@ -109,7 +109,7 @@ internal class Logger : GLib.Object ...@@ -109,7 +109,7 @@ internal class Logger : GLib.Object
/* Wake up any waiters. */ /* Wake up any waiters. */
foreach (unowned DelegateWrapper wrapper in Logger._prepare_waiters) foreach (unowned DelegateWrapper wrapper in Logger._prepare_waiters)
{ {
wrapper.cb (); Idle.add (wrapper.cb);
} }
Logger._prepare_waiters = null; Logger._prepare_waiters = null;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment