Does anyone know if there are any lock-free container libraries available for .NET ?
Preferably something that is proven to work and faster than the Synchronized wrappers we have in .NET.
I have found some articles on the .NET, but none of them specify any speed benchmarking, nor do they inspire much confidence in their reliability.
Thanks
for(;;){...some code...}and it will have a return statement inside there. It has a comment at the top stating: "This queue is mostly for completion or for use in other classes in the library, considering that the 4.0 FCL already has a lock-free queue. The Mono implementation is very close to this, while the MS implementation is more complicated but should offer better use of CPU caches...<snip>" - Louis Somerswhile(true)is perhaps more popular today the former reads to me as "for ever" while the latter as "while basic-logical-rules-of-the-universe-hold", which disturbs me slightly. I did add some functionality beyond the FCL since that comment, I should edit it, but I think I'll save that until a more thorough review later this year. - Jon Hannagotoin hand-coded tail-call elimination) or quirky because the state-transitions are unusual compared to what would be natural if concurrency didn't have to be considered.while(true)andfor(;;)though are exactly the same, it's purely a matter of style.for(;;)is used in K&R and Stroustrup's C++ book butwhile(true)became more popular later on, sofor(;;)is just more old-fashioned. (Also some older tools will complain about the constant, though not in C#)... - Jon Hanna