mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2024-11-27 06:10:28 +01:00
DroidFish: Better handling of large amounts of data from the engine.
This commit is contained in:
parent
97160698a9
commit
af9b505e87
|
@ -687,6 +687,16 @@ public class DroidComputerPlayer {
|
|||
if (Thread.currentThread().isInterrupted())
|
||||
return;
|
||||
String s = uci.readLineFromEngine(timeout);
|
||||
long t0 = System.currentTimeMillis();
|
||||
while (s != null && !s.isEmpty()) {
|
||||
if (Thread.currentThread().isInterrupted())
|
||||
return;
|
||||
processEngineOutput(uci, s);
|
||||
s = uci.readLineFromEngine(1);
|
||||
long t1 = System.currentTimeMillis();
|
||||
if (t1 - t0 >= 1000)
|
||||
break;
|
||||
}
|
||||
if ((s == null) || Thread.currentThread().isInterrupted())
|
||||
return;
|
||||
processEngineOutput(uci, s);
|
||||
|
@ -1041,6 +1051,7 @@ public class DroidComputerPlayer {
|
|||
listener.notifyStats(id, statNodes, statNps, statTBHits, statHash, statTime);
|
||||
statsModified = false;
|
||||
}
|
||||
lastGUIUpdate = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
private final static void myAssert(boolean b) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user