goroutine

package
v0.0.0-...-63c3a42 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Function

type Function func()

Function defines a simple function with no arguments or return values. This is typically used as a closure.

type Goroutine

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

Goroutine represents a goroutine. A Goroutine is useful for running functions in a specific environment (such as a pinned OS thread with modified attributes).

func New

func New() *Goroutine

New creates a Goroutine with an underlying goroutine which can run functions.

func (*Goroutine) Quit

func (g *Goroutine) Quit()

Quit causes the underlying goroutine to exit. If there is a currently running function, it will wait for it to complete.

func (*Goroutine) Run

func (g *Goroutine) Run(fn Function)

Run will run a function in the underlying goroutine and wait for it to complete. If there is a currently running function, it will first wait for it to complete.

func (*Goroutine) Start

func (g *Goroutine) Start(fn Function)

Start will run a function in the underlying goroutine. If there is a currently running function, it will first wait for it to complete.

func (*Goroutine) Wait

func (g *Goroutine) Wait()

Wait will wait for a running function to complete.

Jump to

Keyboard shortcuts

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