Skip to content

Commit 2f860d1

Browse files
committed
keep memory contiguous
1 parent e184e61 commit 2f860d1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

reconstruction/ai/src/main/java/org/jlab/service/ai/DCDenoiseEngine.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import ai.djl.translate.TranslateException;
1818
import java.io.IOException;
1919
import java.util.concurrent.BlockingQueue;
20-
import java.util.concurrent.LinkedBlockingQueue;
20+
import java.util.concurrent.ArrayBlockingQueue;
2121

2222
import org.jlab.clas.reco.ReconstructionEngine;
2323
import org.jlab.io.base.DataBank;
@@ -39,7 +39,7 @@ public class DCDenoiseEngine extends ReconstructionEngine {
3939
public static class PredictorPool {
4040
final BlockingQueue<Predictor> pool;
4141
public PredictorPool(int size, ZooModel model) {
42-
pool = new LinkedBlockingQueue<>(size);
42+
pool = new ArrayBlockingQueue<>(size);
4343
for (int i=0; i<size; i++) pool.offer(model.newPredictor());
4444
}
4545
public Predictor get() throws InterruptedException {

0 commit comments

Comments
 (0)