Changeset 1778

Show
Ignore:
Timestamp:
03/30/07 20:01:56
Author:
pvanhoof
Message:

Locking fix

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libtinymailui-gtk/tny-gtk-header-list-model.c

    r1777 r1778  
    378378        g_static_rec_mutex_lock (list_model->iterator_lock); 
    379379 
    380         g_static_rec_mutex_lock (list_model->ra_l_lock); 
    381380        if (G_LIKELY (!iter)) 
    382381                retval = list_model->cur_len; /* list_model->items->len; */ 
    383         g_static_rec_mutex_unlock (list_model->ra_l_lock); 
    384382 
    385383        g_static_rec_mutex_unlock (list_model->iterator_lock); 
     
    461459        gboolean needmore = FALSE; 
    462460 
    463         g_static_rec_mutex_lock (me->ra_l_lock); 
    464461 
    465462        g_mutex_lock (me->ra_lock); 
     
    490487                iter.stamp = me->stamp; 
    491488                iter.user_data = (gpointer) i; 
    492                 g_static_rec_mutex_lock (me->ra_l_lock); 
    493489                me->cur_len = i+1; 
    494490                gtk_tree_model_row_inserted ((GtkTreeModel *)me, path, &iter); 
    495                 g_static_rec_mutex_lock (me->ra_l_lock); 
    496491 
    497492                gtk_tree_path_free (path); 
     
    499494        gdk_threads_leave(); 
    500495 
    501         g_static_rec_mutex_unlock (me->ra_l_lock); 
    502496 
    503497 
     
    514508 
    515509        g_static_rec_mutex_lock (me->iterator_lock); 
    516         g_static_rec_mutex_lock (me->ra_l_lock); 
    517510 
    518511        /* Prepend something to the list itself. The get_length will auto update 
     
    536529        g_mutex_unlock (me->ra_lock); 
    537530 
    538         g_static_rec_mutex_unlock (me->ra_l_lock); 
    539531        g_static_rec_mutex_unlock (me->iterator_lock); 
    540532 
     
    714706        self->iterator_lock = NULL; 
    715707 
    716         g_static_rec_mutex_free (self->ra_l_lock); 
    717         self->ra_l_lock = NULL; 
    718708 
    719709        g_mutex_free (self->ra_lock); 
     
    745735        self->iterator_lock = g_new0 (GStaticRecMutex, 1); 
    746736        g_static_rec_mutex_init (self->iterator_lock); 
    747         self->ra_l_lock = g_new0 (GStaticRecMutex, 1); 
    748         g_static_rec_mutex_init (self->ra_l_lock); 
    749737        self->cur_len = 0; 
    750738 
  • trunk/libtinymailui-gtk/tny-gtk-header-list-model.h

    r1777 r1778  
    6464        GObject parent; 
    6565 
    66         GStaticRecMutex *iterator_lock, *ra_l_lock
     66        GStaticRecMutex *iterator_lock
    6767        TnyFolder *folder; 
    6868        gint stamp, recent_updated;