syncx

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WaitContentNotifyE

func WaitContentNotifyE(ctx context.Context, waiter interface{ Wait(context.Context) error }) <-chan error

WaitContentNotifyE waiter.Wait()

func WaitNotify

func WaitNotify(waiter interface{ Wait() }) <-chan struct{}

WaitNotify waiter.Wait()

func WaitNotifyE

func WaitNotifyE(waiter interface{ Wait() error }) <-chan error

WaitNotifyE waiter.Wait()

Types

type NoCopy

type NoCopy struct{}

NoCopy may be added to structs which must not be copied after the first use.

See https://golang.org/issues/8005#issuecomment-190753527 for details.

Note that it must not be embedded, due to the Lock and Unlock methods.

func (*NoCopy) Lock

func (*NoCopy) Lock()

Lock is a no-op used by -copylocks checker from `go vet`.

func (*NoCopy) Unlock

func (*NoCopy) Unlock()

type Pool

type Pool[T any] struct {
	// contains filtered or unexported fields
}

func NewPool

func NewPool[T any](f func() T) *Pool[T]

func (*Pool[T]) Get

func (p *Pool[T]) Get() T

func (*Pool[T]) Put

func (p *Pool[T]) Put(o T)

Directories

Path Synopsis
goworkersx
Package goworkersx dpaks/goworkers提供了更便利的Submi方法提交任务以及Worker数、任务数等查 询方法、关闭Pool的方法。
Package goworkersx dpaks/goworkers提供了更便利的Submi方法提交任务以及Worker数、任务数等查 询方法、关闭Pool的方法。
grpoolx
Package grpoolx grpool创建Pool的时候需要提供Worker的数量和等待执行的任务的最大数量,任务的提 交是直接往Channel放入任务。
Package grpoolx grpool创建Pool的时候需要提供Worker的数量和等待执行的任务的最大数量,任务的提 交是直接往Channel放入任务。
workerpoolx
Package workerpoolx gammazero/workerpool可以无限制地提交任务,提供了更便利的Submit和SubmitWait方法提交任务, 还可以提供当前的worker数和任务数以及关闭Pool的功能。
Package workerpoolx gammazero/workerpool可以无限制地提交任务,提供了更便利的Submit和SubmitWait方法提交任务, 还可以提供当前的worker数和任务数以及关闭Pool的功能。

Jump to

Keyboard shortcuts

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