progschj / ThreadPool

A simple C++11 Thread Pool implementation
zlib License
7.64k stars 2.21k forks source link

why not fix the problem with condition variable to avoid dead-lock? #45

Closed CheYulin closed 6 years ago

CheYulin commented 6 years ago

never mind... i did not fully understand condition variable implementation when open this issue...

previously, i did not realize that the outer mutex lock guarantees the atomic operation for condition and within the implementation of inner waiting queue, inner mutex lock guarantees the atomic operation for the inner waiting queue