lang

package
v2.1.6+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsUint64

func ContainsUint64(v uint64, array []uint64) bool

ContainsUint64 returns a boolean value indicating whether the specified value v is found in the specified array.

func GetGIDForDebugOnly

func GetGIDForDebugOnly() uint64

GetGIDForDebugOnly is a for debugging only function that returns the goroutine id of the calling goroutine. It is strictly prohibited to use this function anywhere in any production code.

func RunTicker

func RunTicker(td time.Duration,
	tf TickerFunc, stopc1 <-chan struct{}, stopc2 <-chan struct{})

RunTicker runs a ticker at the specified interval, the provided TickerFunc will be called after each tick. The ticker will be stopped when the TickerFunc return a true value or when any of the two specified stop channels is signalled.

Types

type TickerFunc

type TickerFunc func() bool

TickerFunc is type of the function that will be called by the RunTicker function after each tick. The returned boolean value indicates whether the ticker should stop.

Jump to

Keyboard shortcuts

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