From 3dd5d880479d9829498b0433db740abec2a3ca88 Mon Sep 17 00:00:00 2001 From: brinn <brinn> Date: Thu, 3 Jul 2008 06:14:03 +0000 Subject: [PATCH] change: add name of calling thread to name of monitored thread SVN: 7018 --- .../ch/systemsx/cisd/common/concurrent/MonitoringProxy.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/source/java/ch/systemsx/cisd/common/concurrent/MonitoringProxy.java b/common/source/java/ch/systemsx/cisd/common/concurrent/MonitoringProxy.java index 4cc16b147df..8135299e2e7 100644 --- a/common/source/java/ch/systemsx/cisd/common/concurrent/MonitoringProxy.java +++ b/common/source/java/ch/systemsx/cisd/common/concurrent/MonitoringProxy.java @@ -154,6 +154,7 @@ public class MonitoringProxy<T> public Object invoke(final Object myProxy, final Method method, final Object[] args) throws Throwable { + final String callingThreadName = Thread.currentThread().getName(); final Future<Object> future = executor.submit(new NamedCallable<Object>() { public Object call() throws Exception @@ -177,10 +178,10 @@ public class MonitoringProxy<T> { if (nameOrNull != null) { - return nameOrNull; + return callingThreadName + "::" + nameOrNull; } else { - return describe(method); + return callingThreadName + "::" + describe(method); } } }); -- GitLab