use of org.neo4j.kernel.impl.scheduler.GroupedDaemonThreadFactory in project neo4j by neo4j.
the class IndexingServiceTest method latchedIndexPopulation.
private AtomicReference<BinaryLatch> latchedIndexPopulation() {
AtomicReference<BinaryLatch> populationStartLatch = new AtomicReference<>(new BinaryLatch());
scheduler.setThreadFactory(Group.INDEX_POPULATION, (group, parent) -> new GroupedDaemonThreadFactory(group, parent) {
@Override
public Thread newThread(Runnable job) {
return super.newThread(() -> {
populationStartLatch.get().await();
job.run();
});
}
});
return populationStartLatch;
}
Aggregations