summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <matthias.beyer@atos.net>2021-09-15 17:12:57 +0200
committerMatthias Beyer <matthias.beyer@atos.net>2021-09-16 12:07:17 +0200
commit1a8ce54dd38976bde73f2f76126c4d0fb6a9946a (patch)
tree8e59948cc66dce9da99ca6317c6227e6885fcd5d
parented0c75f10afb02436eb43b29693941ec97795b46 (diff)
Add trace output when altering handle bookkeeping of running jobs
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
-rw-r--r--src/endpoint/configured.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/endpoint/configured.rs b/src/endpoint/configured.rs
index c6c4953..e82901e 100644
--- a/src/endpoint/configured.rs
+++ b/src/endpoint/configured.rs
@@ -420,14 +420,16 @@ pub struct EndpointHandle(Arc<Endpoint>);
impl EndpointHandle {
pub fn new(ep: Arc<Endpoint>) -> Self {
- let _ = ep.running_jobs.fetch_add(1, std::sync::atomic::Ordering::Relaxed);
+ let res = ep.running_jobs.fetch_add(1, std::sync::atomic::Ordering::Relaxed);
+ trace!("Endpoint {} has one job more: {}", ep.name(), res + 1);
EndpointHandle(ep)
}
}
impl Drop for EndpointHandle {
fn drop(&mut self) {
- let _ = self.0.running_jobs.fetch_sub(1, std::sync::atomic::Ordering::Relaxed);
+ let res = self.0.running_jobs.fetch_sub(1, std::sync::atomic::Ordering::Relaxed);
+ trace!("Endpoint {} has one job less: {}", self.0.name(), res - 1);
}
}