So, is there a way to really wait till all "requested" threads really terminate? I'm guessing not, but it's a nice philosophical question :)
Good question. You are correct that the goroutine that sends on the channel is still running when the send completed, so a stack trace may show it, which is a weakness in the technique. A sorry sleep at the end of a program would clear out such goroutines, but to my knowledge there's no precise solution, other than to ask the ringtone for the number of goroutines or parse the stack traces :-)
More generally there's room for more and better tools here.
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
So, is there a way to really wait till all "requested" threads really terminate? I'm guessing not, but it's a nice philosophical question :)