once

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Once

type Once sync.Once

same to sync.Once

type OnceNoWait

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

func (*OnceNoWait) Do

func (o *OnceNoWait) Do(do func()) bool

Do 实现类似于 sync.Once.Do 的功能

func (*OnceNoWait) Reset

func (o *OnceNoWait) Reset()

Reset 重置可以重新使用Once的Do

Jump to

Keyboard shortcuts

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