ipc

package
v0.6.5-0...-c050ab2 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BusyWaitTimeout = time.Millisecond * 500
)

Variables

This section is empty.

Functions

func GenFileKey

func GenFileKey(pathName string, projectId int) C.key_t

Types

type Mutex

type Mutex struct {
	S Semaphore
	// contains filtered or unexported fields
}

func NewMutex

func NewMutex(pathName string, projectId int, symmetric bool) Mutex

func (Mutex) Get

func (m Mutex) Get() (int, error)

func (Mutex) Lock

func (m Mutex) Lock()

func (Mutex) Remove

func (m Mutex) Remove() error

func (Mutex) TryLock

func (m Mutex) TryLock() bool

func (Mutex) Unlock

func (m Mutex) Unlock()

type Semaphore

type Semaphore C.int

func NewSemaphore

func NewSemaphore(pathName string, projectId int, initVal int) Semaphore

func (Semaphore) Get

func (s Semaphore) Get() (int, error)

func (Semaphore) Remove

func (s Semaphore) Remove() error

func (Semaphore) Signal

func (s Semaphore) Signal()

func (Semaphore) SignalHold

func (s Semaphore) SignalHold()

func (Semaphore) TryWait

func (s Semaphore) TryWait() bool

func (Semaphore) TryWaitHold

func (s Semaphore) TryWaitHold() bool

func (Semaphore) Wait

func (s Semaphore) Wait()

func (Semaphore) WaitHold

func (s Semaphore) WaitHold()

Jump to

Keyboard shortcuts

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