MCPcopy
hub / github.com/etcd-io/bbolt / Close

Method Close

db.go:694–705  ·  view source on GitHub ↗

Close releases all database resources. It will block waiting for any open transactions to finish before closing the database and returning.

()

Source from the content-addressed store, hash-verified

692// It will block waiting for any open transactions to finish
693// before closing the database and returning.
694func (db *DB) Close() error {
695 db.rwlock.Lock()
696 defer db.rwlock.Unlock()
697
698 db.metalock.Lock()
699 defer db.metalock.Unlock()
700
701 db.mmaplock.Lock()
702 defer db.mmaplock.Unlock()
703
704 return db.close()
705}
706
707func (db *DB) close() error {
708 if !db.opened {

Callers 15

dumpBucketFunction · 0.45
ExampleCursorFunction · 0.45
ExampleCursor_reverseFunction · 0.45
TestMethodPageFunction · 0.45
prepareDataFunction · 0.45
ExampleBucket_PutFunction · 0.45
ExampleBucket_DeleteFunction · 0.45
ExampleBucket_ForEachFunction · 0.45
createDbFunction · 0.45
WriteToMethod · 0.45
CopyFileMethod · 0.45

Calls 1

closeMethod · 0.95

Tested by 15

dumpBucketFunction · 0.36
ExampleCursorFunction · 0.36
ExampleCursor_reverseFunction · 0.36
TestMethodPageFunction · 0.36
prepareDataFunction · 0.36
ExampleBucket_PutFunction · 0.36
ExampleBucket_DeleteFunction · 0.36
ExampleBucket_ForEachFunction · 0.36
createDbFunction · 0.36
TestOpenFunction · 0.36