-/// ThreadsManager class handles all the threads related stuff like init, starting,
-/// parking and, the most important, launching a slave thread at a split point.
+/// MainThread and TimerThread are derived classes used to characterize the two
+/// special threads: the main one and the recurring timer.
+
+struct MainThread : public Thread {
+ MainThread() : thinking(true) {} // Avoid a race with start_thinking()
+ virtual void idle_loop();
+ volatile bool thinking;
+};
+
+struct TimerThread : public ThreadBase {
+
+ static const int Resolution = 5; // Millisec between two check_time() calls
+
+ TimerThread() : run(false) {}
+ virtual void idle_loop();
+
+ bool run;
+};
+
+
+/// ThreadPool struct handles all the threads related stuff like init, starting,
+/// parking and, most importantly, launching a slave thread at a split point.