gxsync

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TaskPool

type TaskPool struct {
	TaskPoolOptions
	// contains filtered or unexported fields
}

task pool: manage task ts

func NewTaskPool

func NewTaskPool(opts ...TaskPoolOption) *TaskPool

build a task pool

func (*TaskPool) AddTask

func (p *TaskPool) AddTask(t task)

add task

func (*TaskPool) Close

func (p *TaskPool) Close()

func (*TaskPool) IsClosed

func (p *TaskPool) IsClosed() bool

check whether the session has been closed.

type TaskPoolOption

type TaskPoolOption func(*TaskPoolOptions)

func WithTaskPoolTaskPoolSize

func WithTaskPoolTaskPoolSize(size int) TaskPoolOption

@size is the task queue pool size

func WithTaskPoolTaskQueueLength

func WithTaskPoolTaskQueueLength(length int) TaskPoolOption

@length is the task queue length

func WithTaskPoolTaskQueueNumber

func WithTaskPoolTaskQueueNumber(number int) TaskPoolOption

@number is the task queue number

type TaskPoolOptions

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

Jump to

Keyboard shortcuts

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