esync

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: MIT Imports: 6 Imported by: 0

README

esync

ReMutex

An implementation of reentrant lock, based on sync.Mutex:

demo1:

var m ReMutex

m.Lock()
m.Lock()
m.Unlock()
m.Unlock()

more demo in sync_remutex_test.go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadFloat32 added in v0.1.12

func LoadFloat32(x *float32) float32

func LoadFloat64 added in v0.1.12

func LoadFloat64(x *float64) float64

func StoreFloat32 added in v0.1.12

func StoreFloat32(x *float32, v float32)

func StoreFloat64 added in v0.1.12

func StoreFloat64(x *float64, v float64)

func SwapFloat32 added in v0.1.12

func SwapFloat32(x *float32, v float32) float32

func SwapFloat64 added in v0.1.12

func SwapFloat64(x *float64, v float64) float64

Types

type AtomicBool added in v0.1.12

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

AtomicBool support atomic operation

func (*AtomicBool) Get added in v0.1.12

func (t *AtomicBool) Get() bool

func (*AtomicBool) Set added in v0.1.12

func (t *AtomicBool) Set(v bool)

func (*AtomicBool) String added in v0.1.12

func (t *AtomicBool) String() string

func (*AtomicBool) Swap added in v0.1.12

func (t *AtomicBool) Swap(v bool) bool

type AtomicFloat32 added in v0.1.12

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

AtomicFloat32 support atomic operation

func (*AtomicFloat32) Get added in v0.1.12

func (t *AtomicFloat32) Get() float32

func (*AtomicFloat32) Set added in v0.1.12

func (t *AtomicFloat32) Set(v float32)

func (*AtomicFloat32) String added in v0.1.12

func (t *AtomicFloat32) String() string

func (*AtomicFloat32) Swap added in v0.1.12

func (t *AtomicFloat32) Swap(v float32) float32

type AtomicFloat64 added in v0.1.12

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

AtomicFloat64 support atomic operation

func (*AtomicFloat64) Get added in v0.1.12

func (t *AtomicFloat64) Get() float64

func (*AtomicFloat64) Set added in v0.1.12

func (t *AtomicFloat64) Set(v float64)

func (*AtomicFloat64) String added in v0.1.12

func (t *AtomicFloat64) String() string

func (*AtomicFloat64) Swap added in v0.1.12

func (t *AtomicFloat64) Swap(v float64) float64

type AtomicInt added in v0.1.13

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

func (*AtomicInt) Add added in v0.1.13

func (t *AtomicInt) Add(v int) int

func (*AtomicInt) Get added in v0.1.13

func (t *AtomicInt) Get() int

func (*AtomicInt) Inc added in v0.1.13

func (t *AtomicInt) Inc() int

func (*AtomicInt) Set added in v0.1.13

func (t *AtomicInt) Set(v int)

func (*AtomicInt) String added in v0.1.13

func (t *AtomicInt) String() string

func (*AtomicInt) Swap added in v0.1.13

func (t *AtomicInt) Swap(v int) int

type AtomicUint16 added in v0.1.12

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

AtomicUint16 support atomic operation

func (*AtomicUint16) Add added in v0.1.12

func (t *AtomicUint16) Add(v int) uint16

func (*AtomicUint16) Get added in v0.1.12

func (t *AtomicUint16) Get() uint16

func (*AtomicUint16) Inc added in v0.1.12

func (t *AtomicUint16) Inc() uint16

func (*AtomicUint16) Set added in v0.1.12

func (t *AtomicUint16) Set(v uint16)

func (*AtomicUint16) String added in v0.1.12

func (t *AtomicUint16) String() string

func (*AtomicUint16) Swap added in v0.1.12

func (t *AtomicUint16) Swap(v uint16) uint16

type ReMutex

type ReMutex struct {
	sync.Mutex
	// contains filtered or unexported fields
}

ReMutex Reentrant Mutex

func (*ReMutex) Lock

func (t *ReMutex) Lock()

func (*ReMutex) Unlock

func (t *ReMutex) Unlock()

Jump to

Keyboard shortcuts

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