Boost logo

Boost :

Subject: Re: [boost] [Block Pointer] Review Request
From: Phil Bouchard (philippe_at_[hidden])
Date: 2011-05-02 16:17:19

On 5/2/2011 1:08 PM, Emil Dotchevski wrote:
> Keep in mind multi-threading issues too. The way the shared_ptr
> framework deals with this is that weak_ptr::lock() returns a
> shared_ptr, so if the object hasn't yet expired at the time lock() is
> called, it can't expire later (since the returned shared_ptr keeps it
> afloat.) This is what makes using weak_ptr for cyclic references safe.

Thanks for the notice. Right now block_ptr locks a mutex when a cyclic
set is being destroyed.


Boost list run by bdawes at, gregod at, cpdaniel at, john at