Convert to sync_cout and sync_endl

Serialize access to std::cout all over the code.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2012-08-29 13:28:59 +02:00
parent 92e759a676
commit 0a003d3ba1
4 changed files with 28 additions and 25 deletions

View File

@@ -363,6 +363,8 @@ void Position::print(Move move) const {
string brd = twoRows + twoRows + twoRows + twoRows + dottedLine;
sync_cout;
if (move)
{
Position p(*this);
@@ -373,7 +375,7 @@ void Position::print(Move move) const {
if (piece_on(sq) != NO_PIECE)
brd[513 - 68*rank_of(sq) + 4*file_of(sq)] = PieceToChar[piece_on(sq)];
cout << brd << "\nFen is: " << to_fen() << "\nKey is: " << st->key << endl;
cout << brd << "\nFen is: " << to_fen() << "\nKey is: " << st->key << sync_endl;
}