Quantcast
Channel: Lock-free stack with reference counting - Stack Overflow
Browsing all 3 articles
Browse latest View live

Answer by Cyril Gao for Lock-free stack with reference counting

I think that the implementation has other problem:Let us suppose that two threads are working on a non-empty lock free stack:thread A calls push() to add a new node, after the line of code...

View Article


Answer by Ben Voigt for Lock-free stack with reference counting

It is possible, but not problematic, because the compare_exchange call will detect it and discard new_counter.

View Article


Lock-free stack with reference counting

From answers to my previous question:Pointers in c++ after deleteit's become clear, that using the values of pointers, that point to "deleted" memory (in particular, copying them) lead to undef...

View Article
Browsing all 3 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>