switch Thread to using an atomic bool instead of abusing a mutex
Change-Id: Ie39649922a8a35a40fcef57647716da3c50766a7
diff --git a/aos/common/util/thread.cc b/aos/common/util/thread.cc
index dbb638e..bfb1f51 100644
--- a/aos/common/util/thread.cc
+++ b/aos/common/util/thread.cc
@@ -24,10 +24,7 @@
void Thread::Join() {
CHECK(!joined_ && started_);
joined_ = true;
- {
- MutexLocker locker(&should_terminate_mutex_);
- should_terminate_ = true;
- }
+ should_terminate_.store(true);
CHECK(pthread_join(thread_, NULL) == 0);
}