clientv3/concurrency: Mutex

This commit is contained in:
Anthony Romano
2016-02-23 21:03:22 -08:00
parent 20b4336cdb
commit d4b2044eb1
12 changed files with 206 additions and 138 deletions

View File

@ -46,7 +46,7 @@ func (q *PriorityQueue) Enqueue(val string, pr uint16) error {
// queue is empty, Dequeue blocks until items are available.
func (q *PriorityQueue) Dequeue() (string, error) {
// TODO: fewer round trips by fetching more than one key
resp, err := q.kv.Get(q.ctx, q.key, withFirstKey()...)
resp, err := q.kv.Get(q.ctx, q.key, v3.WithFirstKey()...)
if err != nil {
return "", err
}