X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/848f8788e91fade2e93c22df2e22d36750fab2aa..a90280fe1ac7b78563d44afffd1d3b0b521b5cd6:/interface/wx/thread.h diff --git a/interface/wx/thread.h b/interface/wx/thread.h index 050e253525..0985caf1b6 100644 --- a/interface/wx/thread.h +++ b/interface/wx/thread.h @@ -454,6 +454,12 @@ public: */ virtual ExitCode Entry() = 0; + /** + @deprecated + Use CreateThread() instead. + */ + wxThreadError Create(unsigned int stackSize = 0); + /** Creates a new thread of the given @a kind. @@ -966,6 +972,10 @@ public: /** 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(); @@ -974,7 +984,7 @@ public: 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 @@ -983,6 +993,13 @@ public: */ wxThreadIdType GetId() const; + /** + Returns the thread kind as it was given in the ctor. + + @since 2.9.0 + */ + wxThreadKind GetKind() const; + /** Gets the priority of the thread, between zero and 100. @@ -1051,17 +1068,6 @@ public: */ 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. @@ -1220,6 +1226,19 @@ protected: 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(); }; @@ -1518,7 +1537,7 @@ public: // Global functions/macros // ============================================================================ -/** @ingroup group_funcmacro_thread */ +/** @addtogroup group_funcmacro_thread */ //@{ /** @@ -1619,7 +1638,7 @@ bool wxIsMainThread(); wxMutexGuiEnter(); // Call GUI here: - my_window-DrawSomething(); + my_window->DrawSomething(); wxMutexGuiLeave(); }