mirror of https://github.com/etcd-io/bbolt.git
Close waits for the transactions to finish
DB.Close() actually waits for the transactions to finish now, since the PR 377. https://github.com/boltdb/bolt/pull/377pull/80/head
parent
ee30b748bc
commit
fafe4b70b5
2
db.go
2
db.go
|
@ -441,7 +441,7 @@ 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