diff --git a/webrtc/system_wrappers/interface/thread_wrapper.h b/webrtc/system_wrappers/interface/thread_wrapper.h index cda4827b01..edfc4bf52b 100644 --- a/webrtc/system_wrappers/interface/thread_wrapper.h +++ b/webrtc/system_wrappers/interface/thread_wrapper.h @@ -88,11 +88,6 @@ public: // Multiple tries to Stop are allowed (e.g. to wait longer than 2 seconds). // It's ok to call Stop() even if the spawned thread has been reclaimed. virtual bool Stop() = 0; - - // Stops the spawned thread dead in its tracks. Will likely result in a - // corrupt state. There should be an extremely good reason for even looking - // at this function. Can cause many problems deadlock being one of them. - virtual bool Shutdown() {return false;} }; } // namespace webrtc diff --git a/webrtc/system_wrappers/source/thread_posix.cc b/webrtc/system_wrappers/source/thread_posix.cc index 35c9f8171a..dd78a70efe 100644 --- a/webrtc/system_wrappers/source/thread_posix.cc +++ b/webrtc/system_wrappers/source/thread_posix.cc @@ -306,20 +306,6 @@ void ThreadPosix::SetNotAlive() _alive = false; } -bool ThreadPosix::Shutdown() -{ -#if !defined(WEBRTC_ANDROID) - if (_thread && (0 != pthread_cancel(_thread))) - { - return false; - } - - return true; -#else - return false; -#endif -} - bool ThreadPosix::Stop() { bool dead = false; diff --git a/webrtc/system_wrappers/source/thread_posix.h b/webrtc/system_wrappers/source/thread_posix.h index 8fcdf10ced..f83e2f9b02 100644 --- a/webrtc/system_wrappers/source/thread_posix.h +++ b/webrtc/system_wrappers/source/thread_posix.h @@ -38,7 +38,6 @@ public: virtual bool SetAffinity(const int* processorNumbers, unsigned int amountOfProcessors); virtual bool Stop(); - virtual bool Shutdown(); void Run(); diff --git a/webrtc/system_wrappers/source/thread_win.cc b/webrtc/system_wrappers/source/thread_win.cc index f458e0e9c1..8d43764329 100644 --- a/webrtc/system_wrappers/source/thread_win.cc +++ b/webrtc/system_wrappers/source/thread_win.cc @@ -133,20 +133,6 @@ void ThreadWindows::SetNotAlive() _alive = false; } -bool ThreadWindows::Shutdown() -{ - DWORD exitCode = 0; - BOOL ret = TRUE; - if (_thread) - { - ret = TerminateThread(_thread, exitCode); - _alive = false; - _dead = true; - _thread = NULL; - } - return ret == TRUE; -} - bool ThreadWindows::Stop() { _critsectStop->Enter(); diff --git a/webrtc/system_wrappers/source/thread_win.h b/webrtc/system_wrappers/source/thread_win.h index 4fd7523ec9..e73c8fd086 100644 --- a/webrtc/system_wrappers/source/thread_win.h +++ b/webrtc/system_wrappers/source/thread_win.h @@ -34,8 +34,6 @@ public: static unsigned int WINAPI StartThread(LPVOID lpParameter); - virtual bool Shutdown(); - protected: virtual void Run();