What happens when calling the destructor of a thread object that has a condition variable waiting?

后端 未结 3 1660
遇见更好的自我
遇见更好的自我 2020-12-06 02:38

I am using a SynchronisedQueue to communicate between threads. I found that destroying the thread object when the attaching thread is waiting on a condition var

3条回答
  •  醉话见心
    2020-12-06 03:28

    You cannot, ever, destroy a resource while something is, or might be, using it. That's really just common sense.

提交回复
热议问题