looper

package
v0.0.0-...-f3d8a94 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Looper is an example package demonstrating use of the callback package. When a new Looper type is made, a new pthread is created which continually loops calling the callback function until it returns false.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Looper

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

func NewLooper

func NewLooper(f func() bool) *Looper

NewLooper creates a new Looper that continually calls f until it returns false.

func (*Looper) Close

func (l *Looper) Close()

Close marks the Looper as not in use. It must be called after the looper function has returned false.

Jump to

Keyboard shortcuts

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