To access a WeakPointerTo in a thread-safe way, use something like this:
if (auto ptr = weak_ptr.lock()) {
..use ptr as regular PointerTo
}
The new implementation no longer needs a reference to be stored to all weak pointers on the WeakReferenceList; a mere count of weak pointers is sufficient. Therefore, callbacks theoretically no longer require a WeakPointerTo to be constructed.
The WeakPointerTo class is not actually atomic; it could be made so, but I don't believe it's worth it at this time.
|
||
|---|---|---|
| .. | ||
| cppparser | ||
| dconfig | ||
| dtoolbase | ||
| dtoolutil | ||
| interrogate | ||
| interrogatedb | ||
| parser-inc | ||
| prc | ||
| prckeys | ||
| pystub | ||
| test_interrogate | ||