Fix atomic behaviour for set_parameters_atomically
#121
+119
−2
set_parameters_atomically
#121