|
Boost : |
From: Alexander Terekhov (terekhov_at_[hidden])
Date: 2003-02-11 11:43:06
Pavel Vasiliev wrote:
[...]
> Thread A, in release_strong:
> atomic_decrement(&strong_count) == 0,
> enter strong_refs_lost(),
> lock
ACK.
> Thread B, in acquire_strong_from_weak: ....
NAK.
Thread B, in release_weak:
atomic_decrement(&weak_count) == 0,
> Thread A, in strong_refs_lost:
> see strong_count == 0,
acquire_weak() --> weak_count == 1,
...
enter release_weak(),
atomic_decrement(&weak_count) == 0,
Thread B, enter weak_refs_lost():
...
destruct_self()
Thread A, enter weak_refs_lost():
WHACK!
Or am I just missing and/or misunderstanding something?
regards,
alexander.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk