syncronizer

package
v0.0.0-...-91eafdd Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Synchronizer

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

func NewSync

func NewSync(maxRoutines int) *Synchronizer
func (s *Synchronizer) AddLink(body func(*Task))

func (*Synchronizer) Finish

func (s *Synchronizer) Finish() (aborted bool)

type Task

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

func (*Task) AbortSync

func (r *Task) AbortSync()
func (r *Task) Link() (close bool)

Link should be called exactly once inside the fn of every task.

Jump to

Keyboard shortcuts

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