Improve thread safety.
Also, correct a spelling error.
This commit is contained in:
parent
338dd6344a
commit
4edd490fbb
1 changed files with 2 additions and 2 deletions
|
@ -19,7 +19,7 @@ class IndexWorkerThread extends VitroBackgroundThread{
|
||||||
protected final int threadNum;
|
protected final int threadNum;
|
||||||
protected final IndexerIface indexer;
|
protected final IndexerIface indexer;
|
||||||
protected final Iterator<Individual> individualsToIndex;
|
protected final Iterator<Individual> individualsToIndex;
|
||||||
protected boolean stopRequested = false;
|
protected volatile boolean stopRequested = false;
|
||||||
|
|
||||||
private static AtomicLong countCompleted= new AtomicLong();
|
private static AtomicLong countCompleted= new AtomicLong();
|
||||||
private static AtomicLong countToIndex= new AtomicLong();
|
private static AtomicLong countToIndex= new AtomicLong();
|
||||||
|
@ -43,7 +43,7 @@ class IndexWorkerThread extends VitroBackgroundThread{
|
||||||
while( ! stopRequested ){
|
while( ! stopRequested ){
|
||||||
|
|
||||||
//do the actual indexing work
|
//do the actual indexing work
|
||||||
log.debug("work found for Woker number " + threadNum);
|
log.debug("work found for Worker number " + threadNum);
|
||||||
addDocsToIndex();
|
addDocsToIndex();
|
||||||
|
|
||||||
// done so shut this thread down.
|
// done so shut this thread down.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue