semaphore

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: LGPL-2.1 Imports: 2 Imported by: 2

Documentation

Overview

Package semaphore provide a semaphore implementation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Semaphore

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

Semaphore represent a semaphore object

func New

func New(n int) *Semaphore

New create a semaphore object

func (*Semaphore) Acquire

func (s *Semaphore) Acquire()

Acquire reference increased

func (*Semaphore) AcquireN

func (s *Semaphore) AcquireN(n int64)

AcquireN reference increased

func (*Semaphore) Release

func (s *Semaphore) Release()

Release reference decreased

func (*Semaphore) ReleaseN

func (s *Semaphore) ReleaseN(n int64)

ReleaseN reference decreased

Jump to

Keyboard shortcuts

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