syncutil

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package syncutil contains methods for working with sync code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OnceMap

type OnceMap[T comparable] struct {
	// contains filtered or unexported fields
}

A OnceMap is a collection sync.Onces accessible by a key. The zero value is usable.

func (*OnceMap[T]) Do

func (o *OnceMap[T]) Do(key T, f func())

Do runs f once.

Jump to

Keyboard shortcuts

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