exchange() from atomic