mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 17:46:26 +08:00
Add thread_win32.h header
Workaround slow std::thread implementation in mingw and gcc for Windows with our own old low level thread functions. No functional change.
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#include "pawns.h"
|
||||
#include "position.h"
|
||||
#include "search.h"
|
||||
#include "thread_win32.h"
|
||||
|
||||
struct Thread;
|
||||
|
||||
@@ -98,8 +99,8 @@ struct ThreadBase {
|
||||
void wait_for(volatile const bool& b);
|
||||
|
||||
std::thread nativeThread;
|
||||
std::mutex mutex;
|
||||
std::condition_variable sleepCondition;
|
||||
Mutex mutex;
|
||||
ConditionVariable sleepCondition;
|
||||
volatile bool exit = false;
|
||||
};
|
||||
|
||||
@@ -167,7 +168,7 @@ struct ThreadPool : public std::vector<Thread*> {
|
||||
|
||||
Depth minimumSplitDepth;
|
||||
Spinlock spinlock;
|
||||
std::condition_variable sleepCondition;
|
||||
ConditionVariable sleepCondition;
|
||||
TimerThread* timer;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user