worker_task: log something when we receive an abort request
This commit is contained in:
parent
271764deb9
commit
a6c16894ff
@ -738,7 +738,11 @@ impl WorkerTask {
|
|||||||
/// Request abort
|
/// Request abort
|
||||||
pub fn request_abort(&self) {
|
pub fn request_abort(&self) {
|
||||||
eprintln!("set abort flag for worker {}", self.upid);
|
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
|
// noitify listeners
|
||||||
let mut data = self.data.lock().unwrap();
|
let mut data = self.data.lock().unwrap();
|
||||||
loop {
|
loop {
|
||||||
|
Loading…
Reference in New Issue
Block a user