possible deadlock during ~ThreadPool
Author: ShunlongHuCreated May 24, 2024Updated Dec 10, 2024
condition.notify_all(); should be enclosed in the brack of unique_lock. This is to ensure that all workers are either waiting or executing while notify_all command is dispatched.
Source: progschj/ThreadPool