
Hi, it's hard to say where the problem is as you presented the code that is probably not relevant to the problem. It won't even compile as the queue is first named 'the_data' and then it's used as 'the_queue'. It would be more useful if you presented the code that is related to the actual errors from the compiler, e.g. the line on which the compiler says the problem is. wbr, Adam Romanek On 07/20/2011 09:21 AM, Sean Farrow wrote:
...
--begin code—
#include<queue>
#include
#include
template<typename Data>
classconcurrent_queue {
private:
boost::mutex the_mutex;
boost::condition_variable the_condition_variable;
std::queue<Data> the_data;
public:
void push(Data const& data)
{
boost::mutex::scoped_lock lock(the_mutex);
the_queue.push(data);
lock.unlock();
the_condition_variable.notify_one();
}
};
--end code--
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users