提交 8eb167ba 编写于 作者: K kohsuke

to improve diagnosability, set the thread name to indicate what it's polling.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@15209 71c3de6d-444a-0410-be80-ed276b4c234a
上级 04951d8e
......@@ -417,6 +417,8 @@ public class SCMTrigger extends Trigger<SCMedItem> {
}
public void run() {
String threadName = Thread.currentThread().getName();
Thread.currentThread().setName("SCM polling for "+job);
try {
while(pollingScheduled) {
getLock().lockInterruptibly();
......@@ -447,6 +449,8 @@ public class SCMTrigger extends Trigger<SCMedItem> {
}
} catch (InterruptedException e) {
LOGGER.info("Aborted");
} finally {
Thread.currentThread().setName(threadName);
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册