MCPcopy Create free account
hub / github.com/dolthub/doltgresql / LockWrite

Function LockWrite

server/auth/database.go:128–132  ·  view source on GitHub ↗

LockWrite takes an anonymous function and runs it while using a write lock. This ensures that the lock is automatically released once the function finishes.

(f func())

Source from the content-addressed store, hash-verified

126// LockWrite takes an anonymous function and runs it while using a write lock. This ensures that the lock is
127// automatically released once the function finishes.
128func LockWrite(f func()) {
129 globalLock.Lock()
130 defer globalLock.Unlock()
131 f()
132}
133
134// dbInit handle the global database initialization. Panics if an error occurs, since it points to something going
135// terribly wrong.

Callers 5

RowIterMethod · 0.92
RowIterMethod · 0.92
RowIterMethod · 0.92
RowIterMethod · 0.92
RowIterMethod · 0.92

Calls 2

LockMethod · 0.80
UnlockMethod · 0.80

Tested by

no test coverage detected