Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsUint64 ¶
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.