Skip to content

Commit b93c489

Browse files
author
Vladimir Kotal
committed
name history cache related threads
1 parent fa8a52e commit b93c489

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/index/IndexerParallelizer.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,12 +264,20 @@ private void createLazyFixedExecutor() {
264264

265265
private void createLazyHistoryExecutor() {
266266
lzHistoryExecutor = LazilyInstantiate.using(() ->
267-
Executors.newFixedThreadPool(env.getHistoryParallelism()));
267+
Executors.newFixedThreadPool(env.getHistoryParallelism(), runnable -> {
268+
Thread thread = Executors.defaultThreadFactory().newThread(runnable);
269+
thread.setName("history-" + thread.getId());
270+
return thread;
271+
}));
268272
}
269273

270274
private void createLazyHistoryFileExecutor() {
271275
lzHistoryFileExecutor = LazilyInstantiate.using(() ->
272-
Executors.newFixedThreadPool(env.getHistoryFileParallelism()));
276+
Executors.newFixedThreadPool(env.getHistoryFileParallelism(), runnable -> {
277+
Thread thread = Executors.defaultThreadFactory().newThread(runnable);
278+
thread.setName("history-file-" + thread.getId());
279+
return thread;
280+
}));
273281
}
274282

275283
private class CtagsObjectFactory implements ObjectFactory<Ctags> {

0 commit comments

Comments
 (0)