mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-01-31 01:20:46 +01:00
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:
parent
e810988f81
commit
82c06be06b
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user