Boost logo

Boost :

From: Pavel Vozenilek (pavel_vozenilek_at_[hidden])
Date: 2006-05-19 07:00:34


"Tobias Schwinger" wrote:

[ COW implementation of pimpl ]

> Note that you have to synchronize the reference counter
> and also the copy operation in a multithreaded environment.
>

If a read-write lock will be added it should
be optional - the overhead may be too big.

It should be also possible to _manually_
trigger the cloning:

* it the pimpl is passed into another hread
  and we do not want to deal with locking
* if the member is const but changes
  a mutable data and the design cannot
  be changed.

/Pavel


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