https://gist.github.com/matteobertozzi/2758693
http://www.cs.rochester.edu/research/synchronization/pseudocode/queues.html
http://blog.lse.epita.fr/articles/42-implementing-generic-double-word-compare-and-swap-.html

 http://www.drdobbs.com/parallel/practical-lock-free-buffers/219500200

 

Try to figure out those 4 hyperlinks ,  the key is DWCAS !!!

 

Using ring buffer is much easier , except for it waste memory ,  what you should keep an eye on

is , using DWCAS , that is quite a great tool to use ~~~

 

 

 

arrow
arrow
    全站熱搜

    hedgezzz 發表在 痞客邦 留言(0) 人氣()