X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b412f9be504e07559a98ae234f30bb1bd0b2aa1f..169935ad4ed842421ef24470a06d1aa298f90fbe:/src/motif/thread.cpp?ds=sidebyside diff --git a/src/motif/thread.cpp b/src/motif/thread.cpp index f5e0d88bfb..96d7af417a 100644 --- a/src/motif/thread.cpp +++ b/src/motif/thread.cpp @@ -414,30 +414,34 @@ void wxThread::OnExit() // wxThreadModule //-------------------------------------------------------------------- -class wxThreadModule : public wxModule +class wxThreadModule : public wxModule { - DECLARE_DYNAMIC_CLASS(wxThreadModule) - public: - virtual bool OnInit() - { - wxMainMutex = new wxMutex(); - wxThreadGuiInit(); - p_mainid = pthread_self(); - wxMainMutex->Lock(); - - return TRUE; - } + virtual bool OnInit(); + virtual void OnExit(); - virtual void OnExit() - { - wxMainMutex->Unlock(); - wxThreadGuiExit(); - delete wxMainMutex; - } +private: + DECLARE_DYNAMIC_CLASS(wxThreadModule) }; IMPLEMENT_DYNAMIC_CLASS(wxThreadModule, wxModule) +bool wxThreadModule::OnInit() +{ + wxMainMutex = new wxMutex(); + wxThreadGuiInit(); + p_mainid = pthread_self(); + wxMainMutex->Lock(); + + return TRUE; +} + +void wxThreadModule::OnExit() +{ + wxMainMutex->Unlock(); + wxThreadGuiExit(); + delete wxMainMutex; +}; + #endif // wxUSE_THREADS