mirror of https://github.com/etcd-io/bbolt.git
Merge pull request #80 from rcoelho/close-wait-transactions
Close waits for the transactions to finishpull/78/merge
commit
b44cfbde69
3
db.go
3
db.go
|
@ -441,7 +441,8 @@ func (db *DB) init() error {
|
|||
}
|
||||
|
||||
// Close releases all database resources.
|
||||
// All transactions must be closed before closing the database.
|
||||
// It will block waiting for any open transactions to finish
|
||||
// before closing the database and returning.
|
||||
func (db *DB) Close() error {
|
||||
db.rwlock.Lock()
|
||||
defer db.rwlock.Unlock()
|
||||
|
|
Loading…
Reference in New Issue