1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-09-16 12:07:11 +08:00
Files
kubo/util/datastore2/threadsafe.go
Jeromy 35a5ca0ef5 update go-datastore to latest
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-09-15 17:15:29 -07:00

23 lines
541 B
Go

package datastore2
import (
"io"
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore"
)
// ClaimThreadSafe claims that a Datastore is threadsafe, even when
// it's type does not guarantee this. Use carefully.
type ClaimThreadSafe struct {
datastore.Batching
}
var _ datastore.ThreadSafeDatastore = ClaimThreadSafe{}
func (ClaimThreadSafe) IsThreadSafe() {}
// TEMP UNTIL dev0.4.0 merges and solves this ugly interface stuff
func (c ClaimThreadSafe) Close() error {
return c.Batching.(io.Closer).Close()
}