inflight

package
v1.8.7 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InFlight

type InFlight interface {
	AddIfNotPresent(uint64) bool
	Delete(uint64)
	Has(uint64) bool
}

func New

func New() InFlight

New creates a instance of a simple InFlight set. It's internal data is protected by a simple sync.RWMutex.

func NewConcurrent

func NewConcurrent() InFlight

NewConcurrent creates a instance of a sharded InFlight set. It shards the values over 256 buckets which should afford a decent increase in concurrency support.

Jump to

Keyboard shortcuts

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