wxThread::GetCPUCount() and SetConcurrency() added and documented

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4837 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-12-06 12:31:04 +00:00
parent c92d798f9d
commit ef8d96c29c
7 changed files with 125 additions and 3 deletions

View 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);