sync

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

README

sync

Implementation of once algorithm which can return error instead of nothing

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Once

type Once struct {
	// contains filtered or unexported fields
}

Once is an object that will perform exactly one action.

func (*Once) Do

func (o *Once) Do(f func() error) error

Do calls function once, if it return error do not lock call

func (*Once) Reset

func (o *Once) Reset()

Reset reset once

Jump to

Keyboard shortcuts

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