lock

package
v0.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	// contains filtered or unexported fields
}

Context is a ready write mutex lock where Locking can return early with an error if the context is done. No error response means the lock is acquired.

func NewContext

func NewContext() *Context

func (*Context) Lock

func (c *Context) Lock(ctx context.Context) error

func (*Context) RLock

func (c *Context) RLock(ctx context.Context) error

func (*Context) RUnlock

func (c *Context) RUnlock()

func (*Context) Unlock

func (c *Context) Unlock()

type OuterCancel

type OuterCancel struct {
	// contains filtered or unexported fields
}

func NewOuterCancel

func NewOuterCancel(cancelErr error, gracefulTimeout time.Duration) *OuterCancel

func (*OuterCancel) Lock

func (o *OuterCancel) Lock() context.CancelFunc

func (*OuterCancel) RLock

func (*OuterCancel) Run

func (o *OuterCancel) Run(ctx context.Context)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL