Lock-free queue

后端 未结 5 1272
醉话见心
醉话见心 2021-01-01 07:35

\"enter \"enter

5条回答
  •  清酒与你
    2021-01-01 08:12

    Your pseudo-code can (and most likely does) suffer from the ABA problem, as only the pointer is checked, and not an accompanying unique stamp, you'll find this paper of use in that regard and as a general guide to lock-free queue implementation, with its pitfalls.

    When dealing with lock free programing, its also a good idea to read up on Herb Sutter's works, as He gives good, insightful explanations to whats required, why its required and its potential weak points (though beware that some of his older publications/articles where found to contain some hidden/unforseen problems).

提交回复
热议问题