Do not cancel detection thread. (#16897)
An atomic flag is used before every iteration of the detection thread. The flag is set right before the cancellation request. It is possible for the detection thread to have already exited prior to sending the cancellation request. The training thread most probably suffers from the same issue, a separate PR will be opened to fix it.
vkalintiris committed
Feb 1, 2024 at 11:44 UTC
41422957d0e99f0519eea8c7380bc391e964baa6
1 file changed
-1
ml/ml.cc
-1
@@ -1844,7 +1844,6 @@ void ml_stop_threads()
1844
if (!Cfg.detection_thread)
1845
return;
1846
1847
- netdata_thread_cancel(Cfg.detection_thread);
1847
netdata_thread_join(Cfg.detection_thread, NULL);
1848
1849
// signal the training queue of each thread