Documentation
¶
Overview ¶
Package goid returns the current goroutine's ID.
Get() is on the hottest path in the interpreter: every dynamic-var deref (Var.getDynamicBinding) and every thread-binding push/pop/clone keys off it. On supported configurations (see goid_fast.go) it is a two-instruction read of the runtime g struct's goid field; everywhere else it falls back to parsing runtime.Stack() output (getSlow below, the original vendored implementation). Selection is compile-time via build tags — ADR 0034.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.