3 ms·
Which lock-free structure have you been using and for what purpose?
by shin_lao 13y ago
Which lock-free structure have you been using and for what purpose?
- colanderman 13y agoMichael & Scott, "Simple, Fast, and Practical Non-Blocking and Blocking Concurrent Queue Algorithms", which I understand to be fairly standard, as well as the "textbook" lock-free stack algorithm (dunno who invented it, I re-"invented" it myself and then confirmed it was identical to that given in The Art of Multiprocessor Programming). Use case for the queue is message-passing. Use case for the stack is as the allocator for the queue.
- shin_lao 13y agoWhich language? C? You did your own implementation? Sounds like you used the wrong stuff.
- colanderman 13y agoYes, C, my own implementation. What is the "right" stuff for low-latency high-contention message passing?
- shin_lao 13y agoWell, if you were coding in C++ I would say "have a look at TBB". The thing is, text book implementations generally lack all the platform dependant details to make it efficient.