`ThreadPool` uses two unguarded `bool`s to communicate between threads, which means the worker threads may never be interrupted after `stop()` is called. https://github.com/asavine/CompFinance/blob/6538e90c95993eebac6b728f1bf28b877bec9b5d/threadPool.h#L42 https://github.com/asavine/CompFinance/blob/6538e90c95993eebac6b728f1bf28b877bec9b5d/threadPool.h#L45 A straightforward fix would be to add a mutex and use it appropriately.
ThreadPooluses two unguardedbools to communicate between threads, which means the worker threads may never be interrupted afterstop()is called.CompFinance/threadPool.h
Line 42 in 6538e90
CompFinance/threadPool.h
Line 45 in 6538e90
A straightforward fix would be to add a mutex and use it appropriately.