From: Marco Costalba Date: Tue, 20 Mar 2012 19:50:24 +0000 (+0100) Subject: Fix Logger under MSVC iostream libraries X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=3b7dbc4f6d68928ad97a5d77561509232dd23f78;hp=3b7dbc4f6d68928ad97a5d77561509232dd23f78;ds=sidebyside 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 ---