aboutsummaryrefslogtreecommitdiff
path: root/src/planner-eds.c
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-09-05 16:27:35 -0500
committerCharles Kerr <charles.kerr@canonical.com>2013-09-05 16:27:35 -0500
commit7eb56163c3032e4da74255cee732fcaf142cafe1 (patch)
treee3e70393d7f13c17a9a259e82d7144baeed41c7a /src/planner-eds.c
parentfdd57db6d6a81951da34675ee89e6e0f1b77b59e (diff)
downloadayatana-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/planner-eds.c')
-rw-r--r--src/planner-eds.c4
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,