Thread-Safe Queue – Two Serious Errors
In my last post “Monitor Object” I implemented a thread-safe queue. I made two serious errors. Sorry. Today, I will fix these issues. First, I want to show you again the erroneous implementation from my last post to understand the context. // monitorObject.cpp #include <condition_variable> #include <functional> #include <queue> #include <iostream> #include <mutex> #include <random> […]