diff --git a/base/include/thread_ex.h b/base/include/thread_ex.h index cc3edb4a9cd44c5eea8fa796ceaec59a685b5901..7482134083a744e3f3bc543783829022023cc21c 100644 --- a/base/include/thread_ex.h +++ b/base/include/thread_ex.h @@ -128,7 +128,6 @@ private: Thread(const Thread&) = delete; Thread& operator=(const Thread&) = delete; static int ThreadStart(void* args); - ThreadStatus Join(); // pthread created as detached private: pthread_t thread_; // Thread ID diff --git a/base/src/thread_ex.cpp b/base/src/thread_ex.cpp index 4811191630eafdebb0fbbb3cec1e98ec1c1524bf..a52e0228a156d621947654cea5c0fb439cb92c68 100644 --- a/base/src/thread_ex.cpp +++ b/base/src/thread_ex.cpp @@ -133,21 +133,6 @@ ThreadStatus Thread::Start(const std::string& name, int32_t priority, size_t sta return ThreadStatus::OK; } -ThreadStatus Thread::Join() -{ - // If the two thread IDs are equal, pthread_equal() returns a non-zero value; otherwise, it returns 0. - if (pthread_equal(thread_, pthread_self()) != 0) { - return ThreadStatus::WOULD_BLOCK; - } - - std::unique_lock lk(lock_); - while (running_) { - cvThreadExited_.wait(lk); - } - - return status_; -} - ThreadStatus Thread::NotifyExitSync() { // If the two thread IDs are equal, pthread_equal() returns a non-zero value; otherwise, it returns 0.