concurrent

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRoutinesAndWaitForFinish

func CreateRoutinesAndWaitForFinish(num int, f func())

CreateRoutinesAndWaitForFinish creates num of goroutines which all execute f() and wait for them to finish.

Types

type Counter

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

func NewCounter

func NewCounter(count, total int) *Counter

func (*Counter) Decrease

func (c *Counter) Decrease() (int, int)

func (*Counter) Increase

func (c *Counter) Increase() (int, int)

func (*Counter) IncreaseTotal

func (c *Counter) IncreaseTotal() (int, int)

func (*Counter) Value

func (c *Counter) Value() (int, int)

Value return count and total

type ImageList added in v1.5.3

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

func NewImageList added in v1.5.3

func NewImageList() *ImageList

func (*ImageList) Add added in v1.5.3

func (i *ImageList) Add(src, dst string)

func (*ImageList) Content added in v1.5.3

func (i *ImageList) Content() types.ImageList

func (*ImageList) Delete added in v1.5.3

func (i *ImageList) Delete(key string)

func (*ImageList) Query added in v1.5.3

func (i *ImageList) Query(src, dst string) bool

func (*ImageList) Rest added in v1.5.3

func (i *ImageList) Rest()

type List

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

func NewList

func NewList() *List

func (*List) GetItems

func (l *List) GetItems() *list.List

func (*List) Len

func (l *List) Len() int

func (*List) PopFront

func (l *List) PopFront() any

func (*List) PushBack

func (l *List) PushBack(value any)

func (*List) PushBackList

func (l *List) PushBackList(other *List)

func (*List) PushFront

func (l *List) PushFront(value any)

func (*List) Reset

func (l *List) Reset()

Jump to

Keyboard shortcuts

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