kk_core

package module
v0.0.0-...-1c597ed Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2020 License: MIT Imports: 2 Imported by: 0

README

kk_core

框架的核心类

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WorkerGroup

type WorkerGroup struct {
	WorkGroup []*WorkerList
	Length    int
}

根据uid进行投递任务,同一用户任务顺序执行

func NewWorkGroup

func NewWorkGroup(groupNum int, c interface{}) *WorkerGroup

func (*WorkerGroup) Push

func (wg *WorkerGroup) Push(uid int, f func(i interface{}))

type WorkerList

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

func NewWorkerList

func NewWorkerList(maxGoroutines int, c interface{}) *WorkerList

func (*WorkerList) Close

func (w *WorkerList) Close()

func (*WorkerList) Process

func (w *WorkerList) Process()

func (*WorkerList) Push

func (w *WorkerList) Push(f func(i interface{}))

func (*WorkerList) SyncProcess

func (w *WorkerList) SyncProcess() int

在主协程顺序执行所有任务

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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