$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-04-29 09:48:14
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.