mirror of
https://github.com/etcd-io/bbolt.git
synced 2025-05-31 11:42:30 +00:00
Merge pull request #80 from rcoelho/close-wait-transactions
Close waits for the transactions to finish
This commit is contained in:
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…
x
Reference in New Issue
Block a user