aboutsummaryrefslogtreecommitdiff
path: root/db.go
diff options
context:
space:
mode:
authorBen Johnson <benbjohnson@yahoo.com>2014-02-15 22:09:35 -0700
committerBen Johnson <benbjohnson@yahoo.com>2014-02-15 22:09:35 -0700
commit3f0daf11ca5f232baa9a891b4301822d2b0cbeeb (patch)
tree057b2bf9d7487343f477f62726919421dc66b6b6 /db.go
parentMerge pull request #32 from benbjohnson/blocks (diff)
parentAdd parallel usage test and race detector. (diff)
downloaddedo-3f0daf11ca5f232baa9a891b4301822d2b0cbeeb.tar.gz
dedo-3f0daf11ca5f232baa9a891b4301822d2b0cbeeb.tar.xz
Merge pull request #34 from benbjohnson/multithreading
Race Detection
Diffstat (limited to 'db.go')
-rw-r--r--db.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/db.go b/db.go
index 34de9f3..57ffa7b 100644
--- a/db.go
+++ b/db.go
@@ -239,10 +239,6 @@ func (db *DB) Close() {
}
func (db *DB) close() {
- // Wait for pending transactions before closing and unmapping the data.
- // db.mmaplock.Lock()
- // defer db.mmaplock.Unlock()
-
// TODO(benbjohnson): Undo everything in Open().
db.freelist = nil
db.path = ""
@@ -391,7 +387,7 @@ func (db *DB) DeleteBucket(name string) error {
// NextSequence returns an autoincrementing integer for the bucket.
// This function can return an error if the bucket does not exist.
func (db *DB) NextSequence(name string) (int, error) {
- var seq int
+ var seq int
err := db.Do(func(t *RWTransaction) error {
var err error
seq, err = t.NextSequence(name)