contexts

package
v1.23.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2023 License: MIT Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Continue

func Continue(cxt context.Context) bool

Continue is a convenience wrapper around a common context cancelation check. It is intended to be used when processing a loop that may be canceled; like so:

for contexts.Continue(cxt) {
  // continue processing something...
}

func Done

func Done(cxt context.Context) bool

Continue is a convenience wrapper around a common context cancelation check. It is essentially the inverse of Continue:

for {
  if contexts.Done(cxt) {
    break
  }
  // otherwise...
}

Types

This section is empty.

Jump to

Keyboard shortcuts

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