]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/thread.h
included missing header files - without them mingw32 compilation failed
[wxWidgets.git] / include / wx / thread.h
index 7c9df994de28333a0f30fb353584502b2bc2796f..a4c4b465df675a18b85ff13a48f20618f7e07589 100644 (file)
@@ -280,6 +280,21 @@ public:
         // NB: at least under MSW worker threads can not call ::wxSleep()!
     static void Sleep(unsigned long milliseconds);
 
+        // get the number of system CPUs - useful with SetConcurrency()
+        // (the "best" value for it is usually number of CPUs + 1)
+        //
+        // Returns -1 if unknown, number of CPUs otherwise
+    static int GetCPUCount();
+
+        // sets the concurrency level: this is, roughly, the number of threads
+        // the system tries to schedule to run in parallel. 0 means the
+        // default value (usually acceptable, but may not yield the best
+        // performance for this process)
+        //
+        // Returns TRUE on success, FALSE otherwise (if not implemented, for
+        // example)
+    static bool SetConcurrency(size_t level);
+
     // constructor only creates the C++ thread object and doesn't create (or
     // start) the real thread
     wxThread(wxThreadKind kind = wxTHREAD_DETACHED);