Documentation ¶
Overview ¶
Package lock is the equivalent of sync.Mutex but with a context.
Prefer standard sync.Mutex if you don't use the context.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Lock ¶
type Lock struct {
// contains filtered or unexported fields
}
Lock is like a mutex but with ctx.
func (*Lock) Lock ¶
func (l *Lock) Lock()
Lock bocks other calls until Unlock() is called.
See LockWithContext()
func (*Lock) LockWithContext ¶
LockWithContext bocks other calls until Unlock() is called or the context is cancelled. It forwards the context error when cancelled.
Click to show internal directories.
Click to hide internal directories.