[folks] telepathy: Call continuations in idle callbacks rather than directly



commit 7088fbafafd3e75f02266aa8b093d69660311b36
Author: Philip Withnall <philip tecnocode co uk>
Date:   Sun Dec 30 22:41:59 2012 +0000

    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

 backends/telepathy/lib/tpf-logger.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/backends/telepathy/lib/tpf-logger.vala b/backends/telepathy/lib/tpf-logger.vala
index 2dccb67..c4f450b 100644
--- a/backends/telepathy/lib/tpf-logger.vala
+++ b/backends/telepathy/lib/tpf-logger.vala
@@ -109,7 +109,7 @@ internal class Logger : GLib.Object
           /* Wake up any waiters. */
           foreach (unowned DelegateWrapper wrapper in Logger._prepare_waiters)
             {
-              wrapper.cb ();
+              Idle.add (wrapper.cb);
             }
 
           Logger._prepare_waiters = null;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]