File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
src/main/java/org/scijava/thread Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,8 @@ public final class DefaultThreadService extends AbstractService implements
5555 ThreadService
5656{
5757
58+ private static final String SCIJAVA_THREAD_PREFIX = "SciJava-" ;
59+
5860 @ Parameter
5961 private LogService log ;
6062
@@ -121,9 +123,7 @@ public void dispose() {
121123
122124 @ Override
123125 public Thread newThread (final Runnable r ) {
124- final String contextHash = Integer .toHexString (context ().hashCode ());
125- final String threadName =
126- "SciJava-" + contextHash + "-Thread-" + nextThread ++;
126+ final String threadName = contextThreadPrefix () + nextThread ++;
127127 return new Thread (r , threadName );
128128 }
129129
@@ -169,4 +169,10 @@ public V call() throws Exception {
169169 }
170170 };
171171 }
172+
173+ private String contextThreadPrefix () {
174+ final String contextHash = Integer .toHexString (context ().hashCode ());
175+ return SCIJAVA_THREAD_PREFIX + contextHash + "-Thread-" ;
176+ }
177+
172178}
You can’t perform that action at this time.
0 commit comments