make wxThread::OnExit private and not public (change tested on wxMSW and wxGTK)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56984 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi
2008-11-26 17:24:00 +00:00
parent 5159e01481
commit a5cc517ff6
2 changed files with 28 additions and 26 deletions

View File

@@ -558,11 +558,6 @@ public:
wxThreadKind GetKind() const wxThreadKind GetKind() const
{ return m_isDetached ? wxTHREAD_DETACHED : wxTHREAD_JOINABLE; } { return m_isDetached ? wxTHREAD_DETACHED : wxTHREAD_JOINABLE; }
// called when the thread exits - in the context of this thread
//
// NB: this function will not be called if the thread is Kill()ed
virtual void OnExit() { }
// Returns true if the thread was asked to terminate: this function should // Returns true if the thread was asked to terminate: this function should
// be called by the thread from time to time, otherwise the main thread // be called by the thread from time to time, otherwise the main thread
// will be left forever in Delete()! // will be left forever in Delete()!
@@ -585,6 +580,11 @@ private:
wxThread(const wxThread&); wxThread(const wxThread&);
wxThread& operator=(const wxThread&); wxThread& operator=(const wxThread&);
// called when the thread exits - in the context of this thread
//
// NB: this function will not be called if the thread is Kill()ed
virtual void OnExit() { }
friend class wxThreadInternal; friend class wxThreadInternal;
// the (platform-dependent) thread class implementation // the (platform-dependent) thread class implementation

View File

@@ -1058,17 +1058,6 @@ public:
*/ */
wxThreadError Kill(); 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. Suspends the thread.
@@ -1227,6 +1216,19 @@ protected:
OnExit() will be called just before exiting. OnExit() will be called just before exiting.
*/ */
void Exit(ExitCode exitcode = 0); 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();
}; };