runtime: one strange result for printing different goroutine IDs by runtime.stack method #36079
Comments
https://play.golang.org/p/iPZaigoakwd its the same: goroutine 5 [running]: 1 5 2 1 3 1 |
the arguments to the goroutine are evaluated before being passed to the function/goroutine, in this case GetGoroutineID is being called from main, before the result is passed to println which is run in the goroutine |
Working as expected. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: