Stop/start the notify main thread at the right level
The thread is stopped/started in wins_prepare/unprepare_external() when hooks are run. There is no need to do it in io_reload_data(). In fact, because of the nested calls notify_stop_main_thread() <--- io_reload_data() ... notify_stop_main_thread() <--- hook/wins_prepare_external() ... notify_start_main_thread() <--- hook/wins_unprepare_external() ... notify_start_main_thread() <--- io_reload_data() the thread has been running after the first hook anyway. Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
parent
a94b0ecde0
commit
a5ae7256b3
7
src/io.c
7
src/io.c
@ -944,9 +944,6 @@ int io_reload_data(void)
|
||||
if (!io_check_data_files_modified())
|
||||
goto cleanup;
|
||||
|
||||
if (notify_bar())
|
||||
notify_stop_main_thread();
|
||||
|
||||
/* Reinitialize data structures. */
|
||||
apoint_llist_free();
|
||||
event_llist_free();
|
||||
@ -970,11 +967,7 @@ int io_reload_data(void)
|
||||
keys_wait_for_any_key(win[KEY].p);
|
||||
}
|
||||
|
||||
if (notify_bar())
|
||||
notify_start_main_thread();
|
||||
|
||||
ret = 1;
|
||||
|
||||
cleanup:
|
||||
mem_free(msg_um_asktype);
|
||||
return ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user