thread

package
v1.10.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Thread

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

Thread represents an OS thread.

func New

func New() *Thread

New creates a new thread.

It is assumed that the OS thread is fixed by runtime.LockOSThread when New is called.

func (*Thread) Call

func (t *Thread) Call(f func() error) error

Call calls f on the thread.

Do not call this from the same thread. This would block forever.

func (*Thread) Loop

func (t *Thread) Loop(context context.Context)

Loop starts the thread loop.

Loop must be called on the thread.

Jump to

Keyboard shortcuts

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