From 036ac6c3e68112e8674ca1b1dae310c6264433c0 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Tue, 18 Feb 2025 13:05:32 -0400 Subject: [PATCH] MT#62181 obsolete thread cancellation Unused. Change-Id: I8d187dea14fcc7941054ab764f24f2fc544b2fa6 --- core/AmThread.cpp | 12 ------------ core/AmThread.h | 2 -- 2 files changed, 14 deletions(-) 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(); };