diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2009-10-13 06:22:29 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2009-10-13 06:22:29 +0000 |
commit | 996fee475e501a991ff04548abf1d9a5ff311d89 (patch) | |
tree | 56edd44200c14b391bec6fae772a53f8cf362ac3 /src/query_search.c | |
parent | 9442a550896bbc164a13c8e2f25d9674ca86fd2a (diff) |
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
Diffstat (limited to 'src/query_search.c')
-rw-r--r-- | src/query_search.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |