goroutine

package
v0.0.0-...-1643519 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Overview

Package goroutine is mostly to house a function for obtaining the current goroutine ID, but probably will eventually contain other naughty functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ID

type ID uint64

ID is the ID number of a goroutine.

func CurID

func CurID() ID

CurID gets the ID number of the current goroutine.

According to the Go Authors, using this number will cause, among other things: sponaneous combustion, incurable insanity, and rapid acute cardiac lithomophosis (RACL).

That said, it turns out that this functionality is very important for implemening things such as the errors.Annotate functionality.

If, at some point, the Go Authors deign to provide this functionality via the runtime package, this method and type will be deleted immediately in favor of that.

(if you are a Go Author, please, please, PLEASE provide this as part of the stdlib...).

Jump to

Keyboard shortcuts

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