29 Apr
2005
29 Apr
'05
2:48 p.m.
Ross Manges wrote:
Ahh ha! Thanks for the insight. That has helped me sqash a few bugs. Now I do have one last remaining situation, and I have updated my example code to use shared_from_this() in a very precarious way.
Your problem is not related to shared_from_this at all: void SimpleQueue1::add(ElementPtr elem) { queue.push_back(elem); } You just forgot to protect queue.push_back by locking the queue mutex.