Boost logo

Boost :

Subject: Re: [boost] thread_safe_ptr class interest request
From: Philippe Vaucher (philippe.vaucher_at_[hidden])
Date: 2010-07-28 19:32:47


I was about to make the same comment, however I noticed there is a
> thread_safe_ptr::scoped_lock with pointer semantics for such
> occasions. I think this solution is nice and would happily see it as a
> part of boost smart pointer or thread libraries.
>
> int pop() {
> thread_safe_ptr< std::stack<int> >::scoped_lock lock(data_ptr);
> int my_top = lock->top();
> lock->pop();
> return my_pop;
> }
>

Yes exactly, the current code doesn't support this yet but it was in the
pipeline.

Philippe


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk