Boost logo

Boost :

From: Miki Jovanovic (miki_at_[hidden])
Date: 2000-03-03 15:00:23


Hi Mark,

Smart pointers in my apps are not copied many times, so I am really
interested in your linked pointers.

I just have couple of small issues with linked_ptr. I'll try to keep
them brief. They all seem to be related to synchronisation...

- Small issue is having Windows specific code.

- Big issue is that all linked_ptr's share the same critical section.
This means that all pointer assignments will be serialised accross
threads and even processors on multi processor machines.

- Also huge issue, you protect the left, right pointers, however, you
do not protect ptr. In your setup, left, right AND ptr, must be changed
together, or inconsistency will occur. Examine ptr1 = ptr2 and ptr1 =
ptr3 executing in parallel.

- Sorry for not compiling your code, but will it compile with a static
variable declaration without the corresponding .cpp file where it is
defined?

Cheers,

Miki.


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