Documentation ¶
Index ¶
- type Concurrent
- func (c *Concurrent) AsyncDo(f func() bool, cb func(err error))
- func (c *Concurrent) AsyncDoByQueue(queueId int64, fn func() bool, cb func(err error))
- func (c *Concurrent) Close()
- func (d *Concurrent) DoCallback(cb func(err error))
- func (c *Concurrent) GetCallBackChannel() chan func(error)
- func (c *Concurrent) OpenConcurrent(minGoroutineNum int32, maxGoroutineNum int32, maxTaskChannelNum int)
- func (c *Concurrent) OpenConcurrentByNumCPU(cpuNumMul float32)
- type IConcurrent
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或者更高
Click to show internal directories.
Click to hide internal directories.