concurrent linked list

后端 未结 5 1251
既然无缘
既然无缘 2021-02-05 20:45

I am trying to design a linked list in c++ that allows concurrent access. Clearly using a single lock for this list is grossly inefficient since disjoint areas may be updated in

5条回答
  •  生来不讨喜
    2021-02-05 21:37

    Are you sure this is a problem worth solving? Would it perhaps be more useful to encapsulate the actual end-use into a class that handles the locking of a normal list and provides a thread-safe interface? This way you don't try to put locking at too low of a level (which as you surmised is not an easy problem to solve).

提交回复
热议问题