SList is lock-free, not wait-free. At its heart, it's using
InterlockedCompareExchange64 to swap the (head (32), counter (16), depth
(16)) tuple.
--
/George V. Reilly [EMAIL PROTECTED]
http://www.georgevreilly.com/blog
The biggest mistake is not learning from all your other mistakes.
Ivanoff, Alex wrote:
Does it mean no one is using them? I do not think so. Even Win32 API has it
(SList).
-----Original Message-----
From: Discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf
Of George V. Reilly
Sent: Friday, April 13, 2007 15:41
To: [EMAIL PROTECTED]
Subject: Re: [ADVANCED-DOTNET] Lock-free collections
According to http://en.wikipedia.org/wiki/Non-blocking_synchronization,
wait-free algorithms (what you're asking for) are rare in research and
in practice, because of the overhead associated with them.
--
/George V. Reilly
http://www.georgevreilly.com/blog
On 4/13/07, Alex Ivanoff <[EMAIL PROTECTED]> wrote:
I looked at a couple of lock-free collection implementations (Richter's
PowerThreading Library, Lock-free LIFO Stack
http://msdn.microsoft.com/msdnmag/issues/07/05/CLRInsideOut/default.aspx#S7
, etc.) based on InterlockedCompareExchange. All of them have potential of
going into infinite loop in Push/Enqueue/Pop/Dequeue methods. Although the
probability is very low it still exists.
Has anyone ever thought of/implemented a fix for it? Or am I missing
something obvious?
Alex
===================================
This list is hosted by DevelopMentor® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
===================================
This list is hosted by DevelopMentor� http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
===================================
This list is hosted by DevelopMentor� http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com