thread

package
v0.0.0-...-f6f1029 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ThreadFunc

type ThreadFunc func()

type ThreadFuncCancel

type ThreadFuncCancel func(quit context.Context, cancel context.CancelFunc)

type ThreadGroup

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

func NewThreadGroup

func NewThreadGroup(parent context.Context) *ThreadGroup

func (*ThreadGroup) Cancel

func (group *ThreadGroup) Cancel()

func (*ThreadGroup) CancelAndWait

func (group *ThreadGroup) CancelAndWait()

func (*ThreadGroup) Context

func (group *ThreadGroup) Context() context.Context

func (*ThreadGroup) Done

func (group *ThreadGroup) Done() <-chan struct{}

func (*ThreadGroup) Spawn

func (group *ThreadGroup) Spawn(f ThreadFunc)

func (*ThreadGroup) SpawnN

func (group *ThreadGroup) SpawnN(f ThreadFunc, i int)

func (*ThreadGroup) SpawnWithCancel

func (group *ThreadGroup) SpawnWithCancel(f ThreadFuncCancel)

func (*ThreadGroup) SubGroup

func (group *ThreadGroup) SubGroup() *ThreadGroup

create a new group that can have its own set of threads. * the current group will wait for all subgroups to exit

func (*ThreadGroup) Wait

func (group *ThreadGroup) Wait()

Jump to

Keyboard shortcuts

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