]> Cypherpunks repositories - gostls13.git/commit
runtime: make newproc1 not start the goroutine
authorAustin Clements <austin@google.com>
Wed, 15 Apr 2020 17:56:05 +0000 (13:56 -0400)
committerAustin Clements <austin@google.com>
Wed, 29 Apr 2020 21:29:08 +0000 (21:29 +0000)
commitb3863fbbc2fe1dbf516111992854aa9178d01410
tree41ef8714fd87578dceceac3daa498b3e211aab57
parent197a2a3799cebd91ec623616c6b5fac850955b58
runtime: make newproc1 not start the goroutine

Currently, newproc1 allocates, initializes, and schedules a new
goroutine. We're about to change debug call injection in a way that
will need to create a new goroutine without immediately scheduling it.
To prepare for that, make scheduling the responsibility of newproc1's
caller. Currently, there's exactly one caller (newproc), so this
simply shifts that responsibility.

For #36365.

Change-Id: Idacd06b63e738982e840fe995d891bfd377ce23b
Reviewed-on: https://go-review.googlesource.com/c/go/+/229298
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/runtime/proc.go