Tag: thread

  • std::mutex crash on initial lock (Interesting thread releated bug with fix included!)

    Have been writing some code to test out creating worker threads in C++ and came across an interesting bug where my program would crash on the first lock of the mutex. Thought it was an interesting little problem to solve. Hint: Crash isn’t necessarily 100%… #include <stdio.h> #include <thread> #include <vector> #include <mutex> #include <atomic>…