]> git.sesse.net Git - stockfish/commit
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)
commit3b7dbc4f6d68928ad97a5d77561509232dd23f78
treea24386a38a83392d3a2d482485a61b8ea4e92407
parent17d1940278aadde3d9d844f7c913ca6c8655bbf3
Fix Logger under MSVC iostream libraries

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>
src/misc.cpp