26
26
import java .util .concurrent .ExecutorService ;
27
27
import java .util .concurrent .Executors ;
28
28
import java .util .concurrent .ForkJoinPool ;
29
- import java .util .concurrent .ScheduledThreadPoolExecutor ;
30
29
import java .util .logging .Logger ;
31
30
import org .opensolaris .opengrok .analysis .Ctags ;
32
31
import org .opensolaris .opengrok .analysis .CtagsValidator ;
47
46
*/
48
47
public class IndexerParallelizer implements AutoCloseable {
49
48
50
- private static final int SCHED_THREAD_NUM = 2 ;
51
-
52
49
private static final Logger LOGGER =
53
50
LoggerFactory .getLogger (IndexerParallelizer .class );
54
51
55
52
private final ExecutorService fixedExecutor ;
56
53
private final ForkJoinPool forkJoinPool ;
57
- private final ScheduledThreadPoolExecutor schedExecutor ;
58
54
private final ObjectPool <Ctags > ctagsPool ;
59
55
60
56
/**
@@ -69,7 +65,6 @@ public IndexerParallelizer(RuntimeEnvironment env) {
69
65
// The order of the following is important.
70
66
this .fixedExecutor = Executors .newFixedThreadPool (indexingParallelism );
71
67
this .forkJoinPool = new ForkJoinPool (indexingParallelism );
72
- this .schedExecutor = new ScheduledThreadPoolExecutor (SCHED_THREAD_NUM );
73
68
this .ctagsPool = new BoundedBlockingObjectPool <>(indexingParallelism ,
74
69
new CtagsValidator (), new CtagsObjectFactory (env ));
75
70
}
@@ -98,7 +93,6 @@ public ObjectPool<Ctags> getCtagsPool() {
98
93
@ Override
99
94
public void close () throws Exception {
100
95
if (ctagsPool != null ) ctagsPool .shutdown ();
101
- if (schedExecutor != null ) schedExecutor .shutdown ();
102
96
if (forkJoinPool != null ) forkJoinPool .shutdown ();
103
97
if (fixedExecutor != null ) fixedExecutor .shutdown ();
104
98
}
0 commit comments