task

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: MIT Imports: 2 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackgroundRoutine

type BackgroundRoutine interface {
	AsyncTask(task Task) error
	SyncTask(task Task) error
	SyncTaskWithTimeOut(task Task, timeout time.Duration) error
	AsyncFunction(function func()) error
	SyncFunction(function func()) error
	SyncFunctionWithTimeOut(function func(), timeout time.Duration) error
	Timer(task Task, intervalValue time.Duration, offsetValue time.Duration) error
}

func NewBackgroundRoutine

func NewBackgroundRoutine(capacitySize int) BackgroundRoutine

NewBackgroundRoutine new Background routine

type Task

type Task interface {
	Run()
}

Task 任务对象

Jump to

Keyboard shortcuts

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