DroidFish: Limit the maximum size of the engine to GUI receive buffer.

This prevents out of memory crashes when using a network engine
connected to a 24 core machine running in MultiPV=100 mode.
This commit is contained in:
Peter Osterlund 2016-12-22 23:41:12 +01:00
parent e810988f81
commit 82c06be06b

View File

@ -21,6 +21,12 @@ public class LocalPipe {
}
public final synchronized void addLine(String line) {
while (lines.size() > 10000) {
try {
wait(10);
} catch (InterruptedException e) {
}
}
lines.add(line);
notify();
}