Detach search arguments from UI thread

Detach from the UI thread the input arguments used by
the search threads so that the UI thread is able to receive
and process any command sent by the GUI while other threads
keep searching.

With this patch there is no more need to block the UI
thread after a "stop", so it is a more reliable and
robust solution than the previous patch.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2011-11-27 17:07:17 +01:00
parent 6809b57cfc
commit bb3427ca85
8 changed files with 45 additions and 59 deletions

View File

@@ -97,7 +97,7 @@ CheckInfo::CheckInfo(const Position& pos) {
/// or the FEN string, we want the new born Position object do not depend
/// on any external data so we detach state pointer from the source one.
Position::Position(const Position& pos, int th) {
void Position::copy(const Position& pos, int th) {
memcpy(this, &pos, sizeof(Position));
threadID = th;