Hi Atul,
The only documentation I’m aware of and which I used myself is the source code of Qt :-P. Just search for QBasicAtomic in $QTDIR/src and you’ll find its implementation and some real-life examples how to use it.
In a nutshell, it provides you atomic operations, which you’ll need to make sure that reference counters don’t get corrupted in a multithreaded environment. I think I learned a lot when as I was implementing reference counting in Packet. It’s really tricky to do right, but once you have a working example it’s much easier.
That’s another aspect that needs to be tested! Does reference counting on Packet’s private data (and in general for other classes) work right? Maybe some stress test involving multiple threads is required. Any ideas?
Regards,
Peter
atul wrote:Any idea …. I am not able to find it anywhere in Qt docs…
– cheers atul
