xsync

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package xsync contains the additions to std sync package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Once

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

Once is small wrapper around sync.Once. It stores the result inside.

func (*Once[T]) Do

func (o *Once[T]) Do(fn func() T) T

Do runs the function only once.

Jump to

Keyboard shortcuts

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