Skip to content

Commit 107ca91

Browse files
committed
Give threads better names for debugging
1 parent 6eb4fa0 commit 107ca91

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/java/org/apache/commons/io/ThreadMonitor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ static Thread start(final Thread thread, final Duration timeout) {
6060
if (timeout.isZero() || timeout.isNegative()) {
6161
return null;
6262
}
63-
final Thread monitor = new Thread(new ThreadMonitor(thread, timeout), ThreadMonitor.class.getSimpleName());
63+
final Thread monitor = new Thread(new ThreadMonitor(thread, timeout), "commons-io-ThreadMonitor");
6464
monitor.setDaemon(true);
6565
monitor.start();
6666
return monitor;

src/main/java/org/apache/commons/io/monitor/FileAlterationMonitor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public synchronized void start() throws Exception {
179179
if (threadFactory != null) {
180180
thread = threadFactory.newThread(this);
181181
} else {
182-
thread = new Thread(this);
182+
thread = new Thread(this, "commons-io-FileAlterationMonitor");
183183
}
184184
thread.start();
185185
}

0 commit comments

Comments
 (0)