Closed JherNifol closed 9 years ago
Then what was the actual cause?
I had the definition of the shared_ptr outside the main function, but not inside an class/object essentially:
std::shared_ptr<ThreadPool> _pool;
int main()
{
}
Lol -puts down the Guinness- Sorry
I'm new to c++ and haven't quite figured out what the issue with trying to do it like this is yet. The threads do manage to get into the block for
But creating the threadpool this way leaves them waiting or deadlocked afterwards.
Will continue trying to figure it out tomorrow (good learning experience for myself)
edit nvm my own fault in my test project, works fine lol