Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrTaskPoolClosed error = errors.New("task_pool already closed")
)
Functions ¶
This section is empty.
Types ¶
type TaskHandler ¶
type TaskHandler interface {
Execute()
}
type TaskOption ¶ added in v1.0.0
type TaskPool ¶
func NewTaskPool ¶
func NewTaskPool(capacity int, options ...TaskOption) *TaskPool
func (*TaskPool) Put ¶
func (tp *TaskPool) Put(task TaskHandler) error
func (*TaskPool) WaitAndClose ¶ added in v1.0.0
func (tp *TaskPool) WaitAndClose()
Click to show internal directories.
Click to hide internal directories.