This can have confusing behavior if you call two updates.

Thread 1:
  (current value N)
  value.update(3)
  (current value 6)

Thread 2:
  (current value N)
  value.update(3)
  (current value 6)

Could you either document this more clearly or make the semantics easier to reason about?