diff options
author | Péter Szilágyi <peterke@gmail.com> | 2016-03-11 15:30:25 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2016-03-11 15:30:25 +0800 |
commit | 9ff07304a37799fc820bb4b29ca3ba2a2a3b458f (patch) | |
tree | e1e5e34cf89b8e9ecf90232ea8b035eb55de5f6c /Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/util | |
parent | 850f41b3747d61e0e7e6f0d30eeca12c3a98b08d (diff) | |
download | go-tangerine-9ff07304a37799fc820bb4b29ca3ba2a2a3b458f.tar.gz go-tangerine-9ff07304a37799fc820bb4b29ca3ba2a2a3b458f.tar.zst go-tangerine-9ff07304a37799fc820bb4b29ca3ba2a2a3b458f.zip |
Godeps: pull in the leveldb upstream write race fix
Diffstat (limited to 'Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/util')
-rw-r--r-- | Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/util/pool.go | 21 | ||||
-rw-r--r-- | Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/util/pool_legacy.go | 33 |
2 files changed, 0 insertions, 54 deletions
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/util/pool.go b/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/util/pool.go deleted file mode 100644 index 1f7fdd41f..000000000 --- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/util/pool.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2014, Suryandaru Triandana <syndtr@gmail.com> -// All rights reserved. -// -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// +build go1.3 - -package util - -import ( - "sync" -) - -type Pool struct { - sync.Pool -} - -func NewPool(cap int) *Pool { - return &Pool{} -} diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/util/pool_legacy.go b/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/util/pool_legacy.go deleted file mode 100644 index 27b8d03be..000000000 --- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/util/pool_legacy.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2014, Suryandaru Triandana <syndtr@gmail.com> -// All rights reserved. -// -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// +build !go1.3 - -package util - -type Pool struct { - pool chan interface{} -} - -func (p *Pool) Get() interface{} { - select { - case x := <-p.pool: - return x - default: - return nil - } -} - -func (p *Pool) Put(x interface{}) { - select { - case p.pool <- x: - default: - } -} - -func NewPool(cap int) *Pool { - return &Pool{pool: make(chan interface{}, cap)} -} |