pool

package module
v1.0.0-alpha-f944c3bf7... Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: Apache-2.0 Imports: 3 Imported by: 1

README

pool

Golang implementation of worker pool pattern.

About The Project

The library provides an API to limit the number of goroutines by scheduling tasks in queue.

Features:

  • laconic api
  • safe for concurrent use

Usage

executor := pool.New(10)
executor.Exec(func() {
	fmt.Println("done")
})

License

Pool is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

Contact

  • Email: cherkashin.evgeny.viktorovich@gmail.com
  • Telegram: @evgeny_cherkashin

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pool

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

func New

func New(max int) *Pool

func (*Pool) Exec

func (p *Pool) Exec(task Task)

type Task

type Task func()

Jump to

Keyboard shortcuts

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