xsync

package
v0.0.0-...-d6f1904 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2024 License: MIT Imports: 2 Imported by: 1

README

xsync

-- import "github.com/cmcoffee/snugforge/xsync"

LimitGroup is a sync.WaitGroup combined with a limiter, to limit how many threads are created.

Usage

type BitFlag
type BitFlag uint64

Atomic BitFlag

func (*BitFlag) Has
func (B *BitFlag) Has(flag uint64) bool

Check if flag is set

func (*BitFlag) Set
func (B *BitFlag) Set(flag uint64) bool

Set BitFlag

func (*BitFlag) Unset
func (B *BitFlag) Unset(flag uint64) bool

Unset BitFlag

type LimitGroup
type LimitGroup interface {
	Add(n int)
	Try() bool
	Done()
	Wait()
}
func NewLimitGroup
func NewLimitGroup(max int) LimitGroup

Documentation

Overview

LimitGroup is a sync.WaitGroup combined with a limiter, to limit how many threads are created.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BitFlag

type BitFlag uint64

Atomic BitFlag

func (*BitFlag) Has

func (B *BitFlag) Has(flag uint64) bool

Check if flag is set

func (*BitFlag) Set

func (B *BitFlag) Set(flag uint64) bool

Set BitFlag

func (*BitFlag) Unset

func (B *BitFlag) Unset(flag uint64) bool

Unset BitFlag

type LimitGroup

type LimitGroup interface {
	Add(n int)
	Try() bool
	Done()
	Wait()
}

func NewLimitGroup

func NewLimitGroup(max int) LimitGroup

Jump to

Keyboard shortcuts

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