sync

package
v0.0.0-...-6019ff8 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2018 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flag

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

func (*Flag) Clear

func (a *Flag) Clear()

func (*Flag) IsSet

func (a *Flag) IsSet() bool

func (*Flag) Set

func (a *Flag) Set()

func (*Flag) String

func (a *Flag) String() string

type SpinLock

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

SpinLock implements a simple atomic spin lock, the zero value for a SpinLock is an unlocked spinlock.

func (*SpinLock) Lock

func (sl *SpinLock) Lock()

Lock locks sl. If the lock is already in use, the caller blocks until Unlock is called

func (*SpinLock) String

func (sl *SpinLock) String() string

func (*SpinLock) TryLock

func (sl *SpinLock) TryLock() bool

TryLock will try to lock sl and return whether it succeed or not without blocking.

func (*SpinLock) Unlock

func (sl *SpinLock) Unlock()

Unlock unlocks sl, unlike [Mutex.Unlock](http://golang.org/pkg/sync/#Mutex.Unlock), there's no harm calling it on an unlocked SpinLock

Jump to

Keyboard shortcuts

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