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>
This commit is contained in:
parent
ae7d2d4c6b
commit
8f28b8f9cc
@ -317,6 +317,9 @@ static inline void key_generic_reload(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (notify_bar())
|
||||||
|
notify_stop_main_thread();
|
||||||
|
|
||||||
/* Reinitialize data structures. */
|
/* Reinitialize data structures. */
|
||||||
apoint_llist_free();
|
apoint_llist_free();
|
||||||
event_llist_free();
|
event_llist_free();
|
||||||
@ -336,6 +339,9 @@ static inline void key_generic_reload(void)
|
|||||||
ui_todo_load_items();
|
ui_todo_load_items();
|
||||||
ui_todo_sel_reset();
|
ui_todo_sel_reset();
|
||||||
|
|
||||||
|
if (notify_bar())
|
||||||
|
notify_start_main_thread();
|
||||||
|
|
||||||
do_storage(0);
|
do_storage(0);
|
||||||
notify_check_next_app(1);
|
notify_check_next_app(1);
|
||||||
ui_calendar_monthly_view_cache_set_invalid();
|
ui_calendar_monthly_view_cache_set_invalid();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user