concurrent

package
v1.9.6 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DefaultBufferSize       = 10000
	DefaultAutoFlushTimeout = 5 * time.Second
)

Variables

This section is empty.

Functions

func IterateInParallel

func IterateInParallel(items []interface{}, iterator func(order interface{}))

func NewAsyncBuffer

func NewAsyncBuffer(executionCallback func([]interface{}), config ...int) *asyncBuffer

func NewFlag

func NewFlag() system.Flag

func Parallel

func Parallel(functions ...func())

func StartSingleThreadScheduledExecutor

func StartSingleThreadScheduledExecutor()

Types

type IAsyncTask

type IAsyncTask interface {
	Run()
}

func NewAsyncTask

func NewAsyncTask(runnable func()) IAsyncTask

type IAsyncTaskPool

type IAsyncTaskPool interface {
	Submit(tasks ...func()) IAsyncTaskPool
	Run() IAsyncTaskPool
	Join()
}

func CreateAsyncTaskPool

func CreateAsyncTaskPool(lockOSThread bool) IAsyncTaskPool

func NewAsyncTaskPool

func NewAsyncTaskPool() IAsyncTaskPool

Jump to

Keyboard shortcuts

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