go_pool

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2023 License: GPL-3.0 Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultOptions

func DefaultOptions() *options

func NewGoAsyncDo added in v1.0.8

func NewGoAsyncDo(f GoAsyncFunc, args ...any)

func NewGoSyncDo added in v1.0.8

func NewGoSyncDo(f GoSyncFunc, args ...any) (any, error)

Types

type GoAsyncFunc added in v1.0.8

type GoAsyncFunc = func(...any)

type GoRunners

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

func NewGoRunners

func NewGoRunners(ops ...*options) GoRunners

type GoSyncFunc added in v1.0.8

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

Jump to

Keyboard shortcuts

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