Class WithThreadName
java.lang.Object
org.jenkinsci.plugins.workflow.support.concurrent.WithThreadName
- All Implemented Interfaces:
AutoCloseable
Utility to temporarily append some information to the name of the current thread.
This is helpful for making thread dumps more readable and informative:
stack trace elements do not contain any information about object identity.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
WithThreadName
Sets the current thread’s name.- Parameters:
suffix
- text to append to the original name
-
-
Method Details
-
close
public void close()Restores the original name.- Specified by:
close
in interfaceAutoCloseable
-