Would the simpler `reset!` work here?  Might not need the compare-and-set behavior.