]> git.sesse.net Git - stockfish/commit
Material: protect global map access with locks
authorMarco Costalba <mcostalba@gmail.com>
Tue, 28 Oct 2008 18:30:57 +0000 (19:30 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 1 Nov 2008 11:46:52 +0000 (12:46 +0100)
commitbd3ec6af15200dce777db821ecaf8d808632f605
treeef5869dc18f40009b53c27b60f3345c07f4a0e2c
parentb2b86cfd271819ca1d0f5c3c637e6b53d9c337bc
Material: protect global map access with locks

STL library is not guaranteed to be thread safe, even for
read-access.

So because these global maps are accessed by all the threads
we need to protect them.

This fixes a random crash experienced during testing.

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