rename mu.

This commit is contained in:
Rasmus Munk Larsen 2018-08-23 12:11:58 -07:00
parent 6e0464004a
commit 6cedc5a9b3

View File

@ -169,16 +169,16 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface {
EventCount ec_;
#ifndef EIGEN_THREAD_LOCAL
std::unique_ptr<Barrier> init_barrier_;
std::mutex mu; // Protects per_thread_map_.
std::mutex per_thread_map_mutex_; // Protects per_thread_map_.
std::unordered_map<uint64_t, std::unique_ptr<PerThread>> per_thread_map_;
#endif
// Main worker thread loop.
void WorkerLoop(int thread_id) {
#ifndef EIGEN_THREAD_LOCAL
mu.lock();
per_thread_map_mutex_.lock();
eigen_assert(per_thread_map_.emplace(GlobalThreadIdHash(), new PerThread()).second);
mu.unlock();
per_thread_map_mutex_.unlock();
init_barrier_->Notify();
init_barrier_->Wait();
#endif