sync

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2020 License: Apache-2.0, MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRWLock

func NewRWLock() *rwlock

func Test

func Test()

func Test1

func Test1()

func Test2

func Test2()

func Test3

func Test3()

func Test4

func Test4()

func Test5

func Test5()

Types

type Env

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

func NewEnv

func NewEnv() *Env

func (Env) Locker

func (e Env) Locker(notify chan<- struct{}) TestLocker

func (*Env) NewRunner

func (e *Env) NewRunner(name string, locker func(notify chan<- struct{}) TestLocker) *Runner

func (Env) RLocker

func (e Env) RLocker(notify chan<- struct{}) TestLocker

func (*Env) TestSeq

func (e *Env) TestSeq(name string, step ...func() error) bool

type Locker

type Locker interface {
	Lock()
	Unlock()
}

type RWLock

type RWLock interface {
	Locker
	RLock()
	RUnlock()

	TestAndLock() bool
	TestAndRLock() bool

	RLocker() TestLocker
}

type Runner

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

func (*Runner) Blocked

func (r *Runner) Blocked() error

func (*Runner) Locked

func (r *Runner) Locked() error

func (*Runner) NoLock

func (r *Runner) NoLock() error

func (*Runner) Step

func (r *Runner) Step() error

type SyncPoint added in v0.2.0

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

func (*SyncPoint) IsReached added in v0.2.0

func (this *SyncPoint) IsReached() bool

func (*SyncPoint) Reach added in v0.2.0

func (this *SyncPoint) Reach()

func (*SyncPoint) Sync added in v0.2.0

func (this *SyncPoint) Sync(ctx context.Context) bool

type TestLocker

type TestLocker interface {
	Locker
	TestAndLock() bool
}

type WaitLock added in v0.2.0

type WaitLock interface {
	Wait(ctx context.Context) bool
	Setup(ctx context.Context) WaitLock
	Release()
}

Jump to

Keyboard shortcuts

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