worker_task: log something when we receive an abort request

This commit is contained in:
Dietmar Maurer 2021-01-29 09:22:37 +01:00
parent 271764deb9
commit a6c16894ff

View File

@ -738,7 +738,11 @@ impl WorkerTask {
/// Request abort
pub fn request_abort(&self) {
eprintln!("set abort flag for worker {}", self.upid);
self.abort_requested.store(true, Ordering::SeqCst);
let prev_abort = self.abort_requested.swap(true, Ordering::SeqCst);
if !prev_abort { // log abort one time
self.log(format!("received abort request ..."));
}
// noitify listeners
let mut data = self.data.lock().unwrap();
loop {