asticontext

package
v1.3.1-0...-4e0822b Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Canceller

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

Canceller represents a context with a mutex

func NewCanceller

func NewCanceller() (c *Canceller)

NewCanceller returns a new canceller

func (*Canceller) Cancel

func (c *Canceller) Cancel()

Cancel cancels the canceller context

func (*Canceller) Cancelled

func (c *Canceller) Cancelled() bool

Cancelled returns whether the canceller has cancelled the context

func (*Canceller) Lock

func (c *Canceller) Lock()

Lock locks the canceller mutex

func (*Canceller) NewContext

func (c *Canceller) NewContext() (context.Context, context.CancelFunc)

Lock locks the canceller mutex

func (*Canceller) Reset

func (c *Canceller) Reset()

Reset resets the canceller context

func (*Canceller) Unlock

func (c *Canceller) Unlock()

Unlock unlocks the canceller mutex

Jump to

Keyboard shortcuts

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