Is there a thread safe single linked list?

denizzzka 4denizzz at gmail.com
Sat Oct 13 04:52:46 PDT 2012


On Friday, 12 October 2012 at 23:30:39 UTC, Sean Kelly wrote:

>> 
>> I would be grateful if someone share singly linked list based 
>> on cas()
>
> There's a sample Stack and SList implementation in the 
> concurrency chapter:
>
> http://www.informit.com/articles/printerfriendly.aspx?p=1609144

Of course, I read this article.

I think that SList is not the same thing as FIFO list - get the 
first entry in the queue and get queue entry by numerical order 
are two different things in multithreaded environment, right?

I think its necessary to implement "primitives" like a CASN from 
article "A Pratial Multi-Word Compare-and-Swap Operation" (by 
Timothy L. Harris, Keir Fraser and Ian A. Pratt.) This titanic 
challenge as I see it, but sooner or later it will have to do.

Then we will be able to create various thread safe structures.


More information about the Digitalmars-d-learn mailing list