I had a look at the concurrent collections but they appear to use normal locking underneath the hood. Are there any good examples in the .Net framework that use this locking construct?
I initially looked at ConcurrentDictionary. I saw it was using normal locks but the BlockingCollection class uses SpinWait in its internal methods.
What do you mean by normal locking ? Some kind of
lock(object) { ... }construct ?If yes, you should look at
ConcurrentStackfor example, it uses aSpinWaitfor its job.