The used heuristic of checking the value prior to lock is not totally safe because assignment is not atomic and check might not give proper result.
The used heuristic of checking the value prior to lock is not totally safe because assignment is not atomic and check might not give proper result.