aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchingProgressMonitor.java
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2011-03-01 10:06:39 -0800
committerShawn O. Pearce <spearce@spearce.org>2011-03-01 10:07:08 -0800
commitbf1b970de1e49e1b94e56ff886078c92890ae228 (patch)
tree00164e4dc5d33d8e0de79efa683c6b9d51e26adb /org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchingProgressMonitor.java
parent268ccbebe39a6c509efdcc1a5c21e8fc55871275 (diff)
downloadjgit-bf1b970de1e49e1b94e56ff886078c92890ae228.tar.gz
jgit-bf1b970de1e49e1b94e56ff886078c92890ae228.zip
Paper bag fix BatchingProgressMonitor alarm queue
The alarm queue threads were started with an empty task body, which meant the thread started and terminated immediately, leaving the queue itself with no worker. Change-Id: I2a9b5fe9c2bdff4a5e0f7ec7ad41a54b41a4ddd6 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchingProgressMonitor.java')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchingProgressMonitor.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchingProgressMonitor.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchingProgressMonitor.java
index 5eb959752b..bae6166227 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchingProgressMonitor.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchingProgressMonitor.java
@@ -64,13 +64,16 @@ public abstract class BatchingProgressMonitor implements ProgressMonitor {
int threads = 1;
alarmQueue = new ScheduledThreadPoolExecutor(threads,
new ThreadFactory() {
+ private final ThreadFactory baseFactory = Executors
+ .defaultThreadFactory();
+
public Thread newThread(Runnable taskBody) {
- Thread thr = new Thread("JGit-AlarmQueue");
+ Thread thr = baseFactory.newThread(taskBody);
+ thr.setName("JGit-AlarmQueue");
thr.setDaemon(true);
return thr;
}
});
- alarmQueue.allowCoreThreadTimeOut(false);
alarmQueue.setMaximumPoolSize(alarmQueue.getCorePoolSize());
alarmQueue.setContinueExistingPeriodicTasksAfterShutdownPolicy(false);
alarmQueue.setExecuteExistingDelayedTasksAfterShutdownPolicy(false);