synchronization

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sleep

func Sleep(nanos time.Duration)

func SleepUnsafe

func SleepUnsafe(nanos time.Duration)

Types

type RWLock

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

RWLock is a C++ based Read/Write spinlock tuned for performance. It performs slightly better than a Go sync.RWMutex, however both native code and Go code can use it. If staying in Go, use sync.RWMutex. It will lock a Go scheduler thread up so use it intelligently.

func (RWLock) Lock

func (rw RWLock) Lock()

func (RWLock) LockShared

func (rw RWLock) LockShared()

func (RWLock) LockSharedUnsafe

func (rw RWLock) LockSharedUnsafe()

func (RWLock) LockUnsafe

func (rw RWLock) LockUnsafe()

func (RWLock) TryLock

func (rw RWLock) TryLock() bool

func (RWLock) TryLockShared

func (rw RWLock) TryLockShared() bool

func (RWLock) TryLockSharedUnsafe

func (rw RWLock) TryLockSharedUnsafe() bool

func (RWLock) TryLockUnsafe

func (rw RWLock) TryLockUnsafe() bool

func (RWLock) Unlock

func (rw RWLock) Unlock()

func (RWLock) UnlockShared

func (rw RWLock) UnlockShared()

func (RWLock) UnlockSharedUnsafe

func (rw RWLock) UnlockSharedUnsafe()

func (RWLock) UnlockUnsafe

func (rw RWLock) UnlockUnsafe()

type RWLockPointer

type RWLockPointer struct {
	RWLock
}

func NewLock

func NewLock() RWLockPointer

func (RWLockPointer) Close

func (rw RWLockPointer) Close() error

func (*RWLockPointer) Free

func (rw *RWLockPointer) Free()

type RWTicketLock64

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

Jump to

Keyboard shortcuts

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