From a5ae7256b318925419bc4d619dd428bdebbfde0f Mon Sep 17 00:00:00 2001 From: Lars Henriksen Date: Mon, 20 Aug 2018 20:45:43 +0200 Subject: 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 Signed-off-by: Lukas Fleischer --- src/io.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src') diff --git a/src/io.c b/src/io.c index 9fb9434..5401115 100644 --- a/src/io.c +++ b/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; -- cgit v1.2.3-70-g09d2