sync

package
v0.0.0-...-949612f Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StatusTable

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

StatusTable is a table maintains true/false values.

This table is particularly useful for un/marking and checking values in different goroutines.

func NewStatusTable

func NewStatusTable() *StatusTable

NewStatusTable initializes and returns a new StatusTable object.

func (*StatusTable) IsRunning

func (p *StatusTable) IsRunning(name string) bool

IsRunning checks if value of given name is set to true in the pool.

func (*StatusTable) Start

func (p *StatusTable) Start(name string)

Start sets value of given name to true in the pool.

func (*StatusTable) StartIfNotRunning

func (p *StatusTable) StartIfNotRunning(name string) bool

StartIfNotRunning sets value of given name to true if not already in pool. Returns whether set value was set to true

func (*StatusTable) Stop

func (p *StatusTable) Stop(name string)

Stop sets value of given name to false in the pool.

Jump to

Keyboard shortcuts

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