go_pool

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: GPL-3.0 Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultOptions

func DefaultOptions() *options

func NewAsyncGoDo

func NewAsyncGoDo(f GoFunc, args ...any)

func NewSyncGoDo

func NewSyncGoDo(f GoFunc, args ...any) (any, error)

Types

type GoFunc

type GoFunc = func(...any) (any, error)

type GoRunners

type GoRunners interface {
	// SyncRun 同步执行一个任务
	SyncRun(GoFunc, ...any) (any, error)
	// AsyncRun 异步执行一个任务
	AsyncRun(GoFunc, ...any) error
}

func NewGoRunners

func NewGoRunners(ops ...*options) GoRunners

Jump to

Keyboard shortcuts

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