]> Cypherpunks.ru repositories - gostls13.git/commit
runtime/pprof: Mention goroutine label heritability
authorDavid Finkel <david.finkel@gmail.com>
Wed, 31 Jul 2019 13:10:28 +0000 (09:10 -0400)
committerIan Lance Taylor <iant@golang.org>
Wed, 7 Aug 2019 14:40:17 +0000 (14:40 +0000)
commit0ca4f6be35d2abf54128b57c3aa1a1fcbd5adfe3
treec8c71b37896fca8cea157515ec41e69944c05746
parente37a1b1ca6afcbe3b02d2dfd599ad1d3d926ec34
runtime/pprof: Mention goroutine label heritability

Document goroutine label inheritance. Goroutine labels are copied upon
goroutine creation and there is a test enforcing this, but it was not
mentioned in the docstrings for `Do` or `SetGoroutineLabels`.

Add notes to both of those functions' docstrings so it's clear that one
does not need to set labels as soon as a new goroutine is spawned if
they want to propagate tags.

Updates #32223
Updates #23458

Change-Id: Idfa33031af0104b884b03ca855ac82b98500c8b4
Reviewed-on: https://go-review.googlesource.com/c/go/+/189317
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/runtime/pprof/runtime.go