etcd/clientv3/concurrency
yura 64e8b2e905 clientv3: concurrency.Mutex.Lock() - preserve invariant
Convenient invariant:
- if werr == nil then lock is supposed to be locked at the moment.

While we could not be confident in stronger invariant ('is exactly locked'),
it were inconvenient that previous code could return `werr == nil` after
Mutex.Unlock.

It could happen when ctx is canceled/timeouted exactly after waitDeletes
successfully returned werr == nil and before `<-ctx.Done()` checked.
While such situation is very rare, it is still possible.

fixes #10111
2018-10-05 14:17:32 +03:00
..
doc.go clientv3: update LICENSE header 2016-05-12 20:50:58 -07:00
election.go clientv3/concurrency: Document Election API context parameter 2018-09-13 12:15:01 +05:30
example_election_test.go clientv3: update Go import paths to "go.etcd.io" 2018-08-28 17:47:55 -07:00
example_mutex_test.go clientv3: update Go import paths to "go.etcd.io" 2018-08-28 17:47:55 -07:00
example_stm_test.go clientv3: update Go import paths to "go.etcd.io" 2018-08-28 17:47:55 -07:00
key.go clientv3: update Go import paths to "go.etcd.io" 2018-08-28 17:47:55 -07:00
main_test.go clientv3: update Go import paths to "go.etcd.io" 2018-08-28 17:47:55 -07:00
mutex.go clientv3: concurrency.Mutex.Lock() - preserve invariant 2018-10-05 14:17:32 +03:00
session.go clientv3: update Go import paths to "go.etcd.io" 2018-08-28 17:47:55 -07:00
stm.go clientv3: update Go import paths to "go.etcd.io" 2018-08-28 17:47:55 -07:00