Here is the smart pointer I want to use:
Loki::SmartPtr<T, Loki::COMRefCounted, Loki::DisallowConversion,
Loki::NoCheck, Loki::LockedStorage, Loki::PropagateConst>
My class 'T' has a embedded thread-safe reference counter.
My goal is to have a thread safe smart pointer.
However, while checking how Loki handles this, I noticed that the Loki::LockedStorage::Swap is not protected.
I would have expect a protection to avoid interferences of thread 2 working on smartPtr2 during
the swap of smartPtr1 & smartPtr2 on thread 1.
I checked the RefCountedMTAdj and noticed that the Swap is also not protected.
Can someone explain me why?
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.