concurrent doubly-linked list (1 writer, n-readers)

Posted by Arne on Stack Overflow See other posts from Stack Overflow or by Arne
Published on 2010-05-07T17:57:16Z Indexed on 2010/05/07 18:18 UTC
Read the original article Hit count: 166

Filed under:
|
|

Hi guys,

I am back in the field of programming for my Diploma-thesis now and stumbled over the following issue: I need to implement a thread-safe doubly-linked list for one thread writing the list at any position (delete, insert, mutate node data) and one to many threads traversing and reading the list.

I am well aware that mutexes can be used to serialize access to the list, still I presume that a naive lock around any write operation will be less than optimal. I am wondering whether there are better variants. (I am well aware that 'optimal' has not much of a practical meaning as long as no exact measure/profiling are available but this is an academic thesis after all..)

I am very gratefull for code-samples as well as references to academic granted these have at least a tiny bit of practical relevance.

Thanks at lot

© Stack Overflow or respective owner

Related posts about c++

Related posts about concurrency