progschj / ThreadPool

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

Thread stuck on condition.notify_one(); #85

Open copiltembel opened 3 years ago

copiltembel commented 3 years ago

I am using multiple ThreadPools to process some messages. I have a ThreadPool that enqueues new tasks to another ThreadPool, basically cascading two ThreadPools.

Everything works fine in the beginning, but after a while one of the second ThreadPool's threads gets stuck oncondition.notify_one(); inside the ThreadPool::enqueue method.

I have no clue what is going on. I thought that notify_one() should never block.

Unfortunately I cannot publish the code as it's a proprietary one.