From 996fee475e501a991ff04548abf1d9a5ff311d89 Mon Sep 17 00:00:00 2001 From: hiro Date: Tue, 13 Oct 2009 06:22:29 +0000 Subject: use g_atomic_int_{get,set} for thread terminate flags. git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2282 ee746299-78ed-0310-b773-934348b2243d --- src/query_search.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/query_search.c b/src/query_search.c index 30e7ff51..0e74a808 100644 --- a/src/query_search.c +++ b/src/query_search.c @@ -665,7 +665,7 @@ static gpointer query_search_folder_func(gpointer data) g_async_queue_unref(qdata->queue); #endif - qdata->flag = 1; + g_atomic_int_set(&qdata->flag, 1); g_main_context_wakeup(NULL); debug_print("query_search_folder_func end\n"); @@ -710,7 +710,7 @@ static void query_search_folder(FolderItem *item) thread = g_thread_create(query_search_folder_func, &data, TRUE, NULL); debug_print("query_search_folder: thread started\n"); - while (data.flag == 0) { + while (g_atomic_int_get(&data.flag) == 0) { gtk_main_iteration(); if (prev_count != data.count) { prev_count = data.count; -- cgit v1.2.3