Back to godoc.org

Package goroutine

v0.0.0-...-d4769a7
Latest Go to latest

The latest major version is .

Published: Aug 1, 2020 | License: Apache-2.0 | Module: github.com/luci/luci-go

Overview

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

Index

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...).

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier