*/
virtual ExitCode Entry() = 0;
+ /**
+ @deprecated
+ Use CreateThread() instead.
+ */
+ wxThreadError Create(unsigned int stackSize = 0);
+
/**
Creates a new thread of the given @a kind.
/**
Returns the number of system CPUs or -1 if the value is unknown.
+ For multi-core systems the returned value is typically the total number
+ of @e cores, since the OS usually abstract a single N-core CPU
+ as N different cores.
+
@see SetConcurrency()
*/
static int GetCPUCount();
Returns the platform specific thread ID of the current thread as a long.
This can be used to uniquely identify threads, even if they are not wxThreads.
*/
- static unsigned long GetCurrentId();
+ static wxThreadIdType GetCurrentId();
/**
Gets the thread identifier: this is a platform dependent number that uniquely
*/
wxThreadError Kill();
- /**
- Called when the thread exits.
-
- This function is called in the context of the thread associated with the
- wxThread object, not in the context of the main thread.
- This function will not be called if the thread was @ref Kill() killed.
-
- This function should never be called directly.
- */
- virtual void OnExit();
-
/**
Suspends the thread.
OnExit() will be called just before exiting.
*/
void Exit(ExitCode exitcode = 0);
+
+private:
+
+ /**
+ Called when the thread exits.
+
+ This function is called in the context of the thread associated with the
+ wxThread object, not in the context of the main thread.
+ This function will not be called if the thread was @ref Kill() killed.
+
+ This function should never be called directly.
+ */
+ virtual void OnExit();
};
// Global functions/macros
// ============================================================================
-/** @ingroup group_funcmacro_thread */
+/** @addtogroup group_funcmacro_thread */
//@{
/**
wxMutexGuiEnter();
// Call GUI here:
- my_window-DrawSomething();
+ my_window->DrawSomething();
wxMutexGuiLeave();
}