Thanks this looks definitely useful, and in terms of your future plans i prefer to see the statistics without an impact on performance. I didn't quite understand in line 245 something about fence and in 246 'T is the exactly counter'?
I will try to supplement the comments as much as possible to explain clearly, but lock-free programming is indeed very complex, and I guess no one wants to see a page-long proof here :)
Generally, we ref to the implementation of Arc, but greatly simplify it.
I will try to supplement the comments as much as possible to explain clearly, but lock-free programming is indeed very complex, and I guess no one wants to see a page-long proof here :)
Generally, we ref to the implementation of
Arc
, but greatly simplify it.