When I run my code :
nb workers = 12 I\'m i : 0 HELLO I\'m func1 BYE I\'m func2 terminate called after throwing an instance of \'std::system_error\' what(): I
Your m_lockJobsList mutex (and m_notifyJob condvar) gets destroyed before m_workers threads that try to lock it when wake after condvar notification at ThreadPool destructor.
m_lockJobsList
m_notifyJob
m_workers
ThreadPool