]> git.sesse.net Git - stockfish/commitdiff
Fix Logger under MSVC iostream libraries
authorMarco Costalba <mcostalba@gmail.com>
Tue, 20 Mar 2012 19:50:24 +0000 (20:50 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Tue, 20 Mar 2012 20:46:08 +0000 (21:46 +0100)
We need splitted Tie classes because MSVC stream library
takes a lock on buffer both on reading and on writing and
this causes an hang because, while searching, the I/O
thread is locked on getline() and when main thread is
trying to std::cout() something it blocks on the same
lock waiting for I/O thread getting some input and
releasing the lock.

The solution is to use separated streambuf objects for
cin and cout.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>

No differences found