diff --git a/core/AmThread.cpp b/core/AmThread.cpp index 355f7487..152b0bd6 100644 --- a/core/AmThread.cpp +++ b/core/AmThread.cpp @@ -107,18 +107,6 @@ void AmThread::stop() //pthread_cancel(_td); } -void AmThread::cancel() { - lock_guard _l(_m_td); - - int res; - if ((res = pthread_cancel(_td)) != 0) { - ERROR("pthread_cancel failed with code %i\n", res); - } else { - DBG("Thread %lu is canceled.\n", (unsigned long int) _pid); - _stopped = true; - } -} - void AmThread::join() { if(!is_stopped()) diff --git a/core/AmThread.h b/core/AmThread.h index df0e9242..b99706c4 100644 --- a/core/AmThread.h +++ b/core/AmThread.h @@ -137,8 +137,6 @@ public: bool is_stopped() { return _stopped; } /** Wait for this thread to finish */ void join(); - /** kill the thread (if pthread_setcancelstate(PTHREAD_CANCEL_ENABLED) has been set) **/ - void cancel(); int setRealtime(); };