From 8f28b8f9cce55c23137e24132eaa9d110c7cdb39 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Thu, 17 Jul 2014 20:12:27 +0200 Subject: Pause notification thread when reloading items Prevent the notification thread from accessing data structures for appointments and todo items while we are recreating them. Signed-off-by: Lukas Fleischer --- src/calcurse.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/calcurse.c b/src/calcurse.c index 8ba25ed..6e4ea08 100644 --- a/src/calcurse.c +++ b/src/calcurse.c @@ -317,6 +317,9 @@ static inline void key_generic_reload(void) } } + if (notify_bar()) + notify_stop_main_thread(); + /* Reinitialize data structures. */ apoint_llist_free(); event_llist_free(); @@ -336,6 +339,9 @@ static inline void key_generic_reload(void) ui_todo_load_items(); ui_todo_sel_reset(); + if (notify_bar()) + notify_start_main_thread(); + do_storage(0); notify_check_next_app(1); ui_calendar_monthly_view_cache_set_invalid(); -- cgit v1.2.3-70-g09d2