Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Node<T> NextNode
- {
- get { return _nextNode; }
- set
- {
- var r = new Random();
- Node<T> initialValue, computedValue;
- do
- {
- initialValue = _nextNode;
- computedValue = value;
- }
- while (initialValue != Interlocked.CompareExchange(ref _nextNode,
- computedValue, initialValue));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement