]> git.sesse.net Git - stockfish/commit
Introduce serialization of accesses to std::cout
authorMarco Costalba <mcostalba@gmail.com>
Wed, 29 Aug 2012 09:25:11 +0000 (11:25 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Wed, 29 Aug 2012 17:11:31 +0000 (19:11 +0200)
commit92e759a676b5f2886160fc8f43744f137a0a19b1
tree2ed05426c1bd497275940597c7141c65f5ca554d
parent3df2c01b5769c7ae996fb5b992c06e4a5428ad35
Introduce serialization of accesses to std::cout

When many threds concurrently print you need to serialize
the access to std::cout to avoid output lines are intermixed
with the contents of each thread.

This is not strictly needed at the moment because
only main thread prints out, although some ad-hoc
test could trigger UCI::loop() printing while searching.

Anyhow we want to lift this pretty avoidable constrain
also as a prerequisite for future work.

This patch just introduces the support, next one will enable
the serialization.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/misc.cpp
src/misc.h