Replace CAS with synchronized to handle races with compute methods