concurrent

package
v2.0.10 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2024 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Concurrent

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

func (*Concurrent) AsyncDo

func (c *Concurrent) AsyncDo(f func() bool, cb func(err error))

func (*Concurrent) AsyncDoByQueue

func (c *Concurrent) AsyncDoByQueue(queueId int64, fn func() bool, cb func(err error))

func (*Concurrent) Close

func (c *Concurrent) Close()

func (*Concurrent) DoCallback

func (d *Concurrent) DoCallback(cb func(err error))

func (*Concurrent) GetCallBackChannel

func (c *Concurrent) GetCallBackChannel() chan func(error)

func (*Concurrent) OpenConcurrent

func (c *Concurrent) OpenConcurrent(minGoroutineNum int32, maxGoroutineNum int32, maxTaskChannelNum int)

func (*Concurrent) OpenConcurrentByNumCPU

func (c *Concurrent) OpenConcurrentByNumCPU(cpuNumMul float32)

cpuMul 表示cpu的倍数 建议:(1)cpu密集型 使用1 (2)i/o密集型使用2或者更高

type IConcurrent

type IConcurrent interface {
	OpenConcurrentByNumCPU(cpuMul float32)
	OpenConcurrent(minGoroutineNum int32, maxGoroutineNum int32, maxTaskChannelNum int)
	AsyncDoByQueue(queueId int64, fn func() bool, cb func(err error))
	AsyncDo(f func() bool, cb func(err error))
}

Jump to

Keyboard shortcuts

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