We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 20aa0b6 + 6f9aa8c commit 8565672Copy full SHA for 8565672
src/thread.cpp
@@ -41,11 +41,13 @@ ThreadPool Threads; // Global object
41
/// Thread constructor launches the thread and waits until it goes to sleep
42
/// in idle_loop(). Note that 'searching' and 'exit' should be already set.
43
44
-Thread::Thread(size_t n) : idx(n) {
45
-
46
#ifdef _WIN32
47
- stdThread = std::thread(&Thread::idle_loop, this);
+Thread::Thread(size_t n) : idx(n), stdThread(&Thread::idle_loop, this) {
48
#else
+Thread::Thread(size_t n) : idx(n) {
+#endif
49
+
50
+#ifndef _WIN32
51
// With increased MAX_MOVES (for variants) the stack can grow larger than the
52
// system default. Explicitly set a sufficient stack size.
53
pthread_attr_t attr;
0 commit comments