[glib/wip/notify-performance: 2/8] [notify] lift some code outside of critical region



commit d7766817a1c231761981b36257e0ec93f0ff3d46
Author: Ryan Lortie <desrt desrt ca>
Date:   Wed Nov 16 12:16:41 2011 +0000

    [notify] lift some code outside of critical region

 gobject/gobjectnotifyqueue.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gobject/gobjectnotifyqueue.c b/gobject/gobjectnotifyqueue.c
index d07fb69..214d606 100644
--- a/gobject/gobjectnotifyqueue.c
+++ b/gobject/gobjectnotifyqueue.c
@@ -141,14 +141,14 @@ g_object_notify_queue_add (GObject            *object,
     {
       GParamSpec *redirect;
 
+      redirect = g_param_spec_get_redirect_target (pspec);
+      if (redirect)
+        pspec = redirect;
+
       G_LOCK(notify_lock);
 
       g_return_if_fail (nqueue->n_pspecs < 65535);
 
-      redirect = g_param_spec_get_redirect_target (pspec);
-      if (redirect)
-	pspec = redirect;
-	    
       /* we do the deduping in _thaw */
       if (g_slist_find (nqueue->pspecs, pspec) == NULL)
         {



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