Allow Bitbases::init() to be called more than once
authorMarco Costalba <mcostalba@gmail.com>
Sun, 22 Mar 2015 11:41:11 +0000 (12:41 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Mon, 23 Mar 2015 16:14:31 +0000 (17:14 +0100)
commitdc3a5f791ebf235444864e633564561811fa1244
tree5eb353e500f0ddb9012ba272da76c8bdf0034e78
parent35a082064fb68805445c5fb94d49d0e6eaefec8e
Allow Bitbases::init() to be called more than once

Currently if we call it more than once, we crash.

This is not a real problem, because this function is
indeed called just once. Nevertheless with this small fix,
that gets rid of a hidden 'static' variable, we cleanly
resolve the issue.

While there, fix also ThreadPool::exit to return in a
consistent state. Now all the init() functions but
UCI::init() are reentrant and can be called multiple
times.

No functional change.
src/bitbase.cpp
src/thread.cpp