Please check out my algorithm unbounded SPSC (wait free?) queue

90 views
Skip to first unread message

Dmitry Knyaginin

unread,
Apr 2, 2015, 2:28:42 AM4/2/15
to lock...@googlegroups.com
Please check out my algorithm unbounded SPSC (wait free?) queue. 
This implementation is wait free? 
I tested this code on os x, windows, ubuntu. 
Everywhere works! 
ThreadSanitizer detect data race. 

C++ code 
http://pastebin.com/fWYjhyyv 

david jobet

unread,
Apr 3, 2015, 8:51:39 AM4/3/15
to lock...@googlegroups.com
Hello, you're not using any barriers : you don't have any memory visibility guarantee. That's why you have data races.
Also, you depend on an allocator : if your allocator is not wait-free, your algo is not wait-free.

With regards,

David
Reply all
Reply to author
Forward
0 new messages