diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2013-09-05 16:27:35 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2013-09-05 16:27:35 -0500 |
commit | 7eb56163c3032e4da74255cee732fcaf142cafe1 (patch) | |
tree | e3e70393d7f13c17a9a259e82d7144baeed41c7a /src | |
parent | fdd57db6d6a81951da34675ee89e6e0f1b77b59e (diff) | |
download | ayatana-indicator-datetime-7eb56163c3032e4da74255cee732fcaf142cafe1.tar.gz ayatana-indicator-datetime-7eb56163c3032e4da74255cee732fcaf142cafe1.tar.bz2 ayatana-indicator-datetime-7eb56163c3032e4da74255cee732fcaf142cafe1.zip |
in planner-eds, use g_atomic_int for enc/dec of the subtask_count
Diffstat (limited to 'src')
-rw-r--r-- | src/planner-eds.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/planner-eds.c b/src/planner-eds.c index 1c0ffc5..f121a32 100644 --- a/src/planner-eds.c +++ b/src/planner-eds.c @@ -113,7 +113,7 @@ on_subtask_done (gpointer gsubdata) /* poke the task */ data = g_task_get_task_data (task); - if (--data->subtask_count <= 0) + if (g_atomic_int_dec_and_test (&data->subtask_count)) on_all_subtasks_done (task); } @@ -247,7 +247,7 @@ my_get_appointments (IndicatorDatetimePlanner * planner, subdata->task = task; subdata->color = e_source_selectable_dup_color (e_source_get_extension (source, E_SOURCE_EXTENSION_CALENDAR)); - data->subtask_count++; + g_atomic_int_inc (&data->subtask_count); subtasks_added = TRUE; e_cal_client_generate_instances (client, begin, |