Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- do
- read the count
- perform mathematical operation
- interlockedcompareexchange( destination, updated count, old count)
- until the interlockedcompareexchange returns the success code.
- a = b;
- if (a != null)
- if (InterlockedDecrement(ref a.m_ref) == 0)
- a.FinalRelease();
- if (b != null)
- InterlockedIncrement(ref b.m_ref);
- a = b;
Add Comment
Please, Sign In to add comment