Boost logo

Boost :

From: William E. Kempf (wekempf_at_[hidden])
Date: 2003-01-22 04:55:13


Philippe A. Bouchard said:
> Ok... I have renamed gc_ptr<> back to shifted_ptr<>. BTW what do you
> people prefer?
> http://groups.yahoo.com/group/boost/files/shifted_ptr.zip
>
> I am not familiar with the std locking mechanisms but how the following
> is supposed to be unlocked?
> #ifdef BOOST_HAS_THREADS
> mutex_type::scoped_lock lock(mtx_);
> #endif

Generally by "lock" going out of scope. This sometimes means adding an
artificial block solely to define the lock scope. In cases where even
this is not enough, the scoped_lock contains lock() and unlock() methods.

William E. Kempf
wekempf_at_[hidden]


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