Boost Threading : Mutex with Conditional Variable ,main thread hanging
问题 I am trying to implement a state machine as a part of a class called" Source Transaction". Evey-time I receive a request in the main thread, it generates an instance of this class and the state machine starts executing until it reaches a state where it has to wait for a response in the main thread in the "event_handler". To solve this issue, I am implementing a conditional variable using boost libraries as following: Source Transaction Class boost::mutex mut; boost::condition_variable cond;