A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://pkg.go.dev/github.com/knative/serving@v0.14.3/pkg/pool below:

pool package - github.com/knative/serving/pkg/pool - Go Packages

Overview

Package pool contains a simple threadpool implementation that accepts work in the form of `func() error` function. The intent is for it to support similar workloads to errgroup, but with a maximum number of concurrent worker threads.

Index Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types type Interface
type Interface interface {
	// Go queues a single unit of work for execution on this pool. All calls
	// to Go must be finished before Wait is called.
	Go(func() error)

	// Wait blocks until all work is complete, returning the first
	// error returned by any of the work.
	Wait() error
}

Interface defines an errgroup-compatible interface for interacting with our threadpool.

func New

New creates a fresh worker pool with the specified size.

func NewWithCapacity

NewWithCapacity creates a fresh worker pool with the specified size.

func NewWithContext added in v0.12.0

NewWithContext creates a pool that is driven by a cancelable context. Just like errgroup.Group on first error the context will be canceled as well.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4