Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • G go
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • go
  • Repository
  • go
  • src
  • runtime
  • runtime2.go
Find file BlameHistoryPermalink
  • Russ Cox's avatar
    runtime: make NumGoroutine and Stack agree not to include system goroutines · c5bafc82
    Russ Cox authored Jan 06, 2016
    Before, NumGoroutine counted system goroutines and Stack (usually) didn't show them,
    which was inconsistent and confusing.
    
    To resolve which way they should be consistent, it seems like
    
    	package main
    	import "runtime"
    	func main() { println(runtime.NumGoroutine()) }
    
    should print 1 regardless of internal runtime details. Make it so.
    
    Fixes #11706.
    
    Change-Id: I6bfe26a901de517728192cfb26a5568c4ef4fe47
    Reviewed-on: https://go-review.googlesource.com/18343
    
    
    Reviewed-by: default avatarAustin Clements <austin@google.com>
    c5bafc82
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7