lightengine

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MIT, Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context) *Engine

func (*Engine) AddTask

func (ng *Engine) AddTask(fns ...Task)

有没有可能父协程return后,子协程还没开始执行 这里有问题,存在协程快速执行完后直接执行回调的情况,此时并非所有任务完成 只能在任务中添加新任务

func (*Engine) Cancel

func (ng *Engine) Cancel()

func (*Engine) Context

func (ng *Engine) Context() context.Context

func (*Engine) OnStop

func (ng *Engine) OnStop(f func())

type Task

type Task func() []Task

Jump to

Keyboard shortcuts

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