executor

package
v1.8.1 Latest Latest
Warning

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

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

Documentation

Overview

Package executor is defined below

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor interface {
	Run()
	Submit(task Task) bool
	// Terminate will gracefully shut down the executor, stop allowing more tasks but will continue to process submitted tasks
	Terminate()
	// AwaitTermination will terminate the executor gracefully and wait for all outstanding tasks to be completed
	// AwaitTeramintion may be called after Terminate or TerminateNow.
	AwaitTermination()
}

Executor interface

func NewExecutor

func NewExecutor() Executor

NewExecutor allocates a new executor with default parameters.

type Task

type Task func()

Task represents a task that can be submitted to an executor

Jump to

Keyboard shortcuts

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