diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2014-02-15 22:09:35 -0700 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2014-02-15 22:09:35 -0700 |
commit | 3f0daf11ca5f232baa9a891b4301822d2b0cbeeb (patch) | |
tree | 057b2bf9d7487343f477f62726919421dc66b6b6 /db.go | |
parent | Merge pull request #32 from benbjohnson/blocks (diff) | |
parent | Add parallel usage test and race detector. (diff) | |
download | dedo-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.go | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -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) |