executor

package
v0.0.0-...-3c4c4c4 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, log logging.Logger, threads int, f RunFunc) error

Types

type Executor

type Executor interface {
	Completed() bool

	Wait() error
}

type Handler

type Handler interface {
	RunAsync(ctx context.Context, f RunFunc) Executor

	Timeout(ctx context.Context, t Thread, f RunFunc, timeout, interval time.Duration) error

	WaitForSubThreads(t Thread)
}

type RunFunc

type RunFunc func(ctx context.Context, log logging.Logger, t Thread, h Handler) error

type Thread

type Thread interface {
	ID() ThreadID

	Release()
	Wait()
}

type ThreadID

type ThreadID int

type ThreadManager

type ThreadManager interface {
	Acquire() Thread
}

func NewThreadManager

func NewThreadManager(threads int) ThreadManager

Jump to

Keyboard shortcuts

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