summaryrefslogtreecommitdiff
path: root/broadcastradio/common/utils/WorkerThread.cpp
diff options
context:
space:
mode:
authorTomasz Wasilczyk <twasilczyk@google.com>2018-11-13 11:26:23 -0800
committerTomasz Wasilczyk <twasilczyk@google.com>2018-11-14 09:28:04 -0800
commit84ec4e14f66f47e9339aa44ec69a3ca7c95106dd (patch)
tree08afad297b9f98e750f14cefe47ad8811dd2c1a8 /broadcastradio/common/utils/WorkerThread.cpp
parent3fdc002bd25ee92c2068469291b29eac3108a12e (diff)
Migrate broadcast radio default HAL to the new logging API.
Bug: 112540729 Test: flash and boot Change-Id: I18d8b508971cd9a9b7b2c9c221674d862ff351d6
Diffstat (limited to 'broadcastradio/common/utils/WorkerThread.cpp')
-rw-r--r--broadcastradio/common/utils/WorkerThread.cpp11
1 files changed, 0 insertions, 11 deletions
diff --git a/broadcastradio/common/utils/WorkerThread.cpp b/broadcastradio/common/utils/WorkerThread.cpp
index bfcbb390e8..31f4d3f83e 100644
--- a/broadcastradio/common/utils/WorkerThread.cpp
+++ b/broadcastradio/common/utils/WorkerThread.cpp
@@ -14,13 +14,8 @@
* limitations under the License.
*/
-#define LOG_TAG "WorkerThread"
-//#define LOG_NDEBUG 0
-
#include <broadcastradio-utils/WorkerThread.h>
-#include <log/log.h>
-
namespace android {
using std::chrono::milliseconds;
@@ -39,7 +34,6 @@ bool operator<(const WorkerThread::Task& lhs, const WorkerThread::Task& rhs) {
WorkerThread::WorkerThread() : mIsTerminating(false), mThread(&WorkerThread::threadLoop, this) {}
WorkerThread::~WorkerThread() {
- ALOGV("%s", __func__);
{
lock_guard<mutex> lk(mMut);
mIsTerminating = true;
@@ -49,8 +43,6 @@ WorkerThread::~WorkerThread() {
}
void WorkerThread::schedule(function<void()> task, milliseconds delay) {
- ALOGV("%s", __func__);
-
auto when = steady_clock::now() + delay;
lock_guard<mutex> lk(mMut);
@@ -59,14 +51,11 @@ void WorkerThread::schedule(function<void()> task, milliseconds delay) {
}
void WorkerThread::cancelAll() {
- ALOGV("%s", __func__);
-
lock_guard<mutex> lk(mMut);
priority_queue<Task>().swap(mTasks); // empty queue
}
void WorkerThread::threadLoop() {
- ALOGV("%s", __func__);
while (!mIsTerminating) {
unique_lock<mutex> lk(mMut);
if (mTasks.empty()) {