diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2014-07-17 20:12:27 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2014-07-17 20:12:27 +0200 |
commit | 8f28b8f9cce55c23137e24132eaa9d110c7cdb39 (patch) | |
tree | bfc09089e3c44e459b68baab2ae12dfef7320540 /src | |
parent | ae7d2d4c6b53160bfe0beae13dfb36b879451bba (diff) | |
download | calcurse-8f28b8f9cce55c23137e24132eaa9d110c7cdb39.zip |
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 <calcurse@cryptocrack.de>
Diffstat (limited to 'src')
-rw-r--r-- | src/calcurse.c | 6 |
1 files changed, 6 insertions, 0 deletions
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(); |