coreos/etcd — pull request #2 by xiangli-cmu (2013-07-08 18:03:45+00:00)
Title: Add testAndSet Command

The command will test to see if the given prevValue is equal to the current value of the key. If equal, the value of the key will change to the new value.

Since the server will process all the in-coming requests in sequence and atomically, this command can help to do locking stuff.