Improve I/O responsivness

Added checking of (stdin->_cnt > 0) from Greko.

This seems to greatly improve responsivness when running
under console. Now while running a 'stockfish bench', any key
press immediately is detected by SF while before there was a
delay of some fraction of a second.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2011-01-08 14:16:04 +01:00
parent d9b96f0e49
commit 0f81f97bb6
3 changed files with 23 additions and 12 deletions
+1 -1
View File
@@ -2013,7 +2013,7 @@ split_point_start: // At split points actual search starts from here
int t = current_search_time();
// Poll for input
if (data_available())
if (input_available())
{
// We are line oriented, don't read single chars
std::string command;