concurrent doubly-linked list (1 writer, n-readers)
- by Arne
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