c++ Programming Glossary: lock1
Massive CPU load using std::lock (c++11) http://stackoverflow.com/questions/13667810/massive-cpu-load-using-stdlock-c11 safe acquiring of two mutexes std unique_lock std mutex lock1 mutex1 std defer_lock std unique_lock std mutex lock2 mutex2.. unique_lock std mutex lock2 mutex2 std defer_lock std lock lock1 lock2 Another part of the class uses a std condition_variable.. same time. The simple change to std unique_lock std mutex lock1 mutex1 std unique_lock std mutex lock2 mutex2 brought the CPU..
|