I recently tried out a go tool for outputting code structure visualization using graphviz -- https://github.com/TrueFurby/go-callvis
I found that goroutines are just labelled <enclosing function>$1 or similar by go-callvis. I could of course be wrong, but my thinking is that this is not really a shortcoming of graphviz, but rather a lack of support for naming goroutines within the language itself as goroutines are also 'unnamed' in this sense within stack traces. It would aid in understanding the purpose of goroutines within a structure diagram if goroutines could be named somehow. I was hoping there was a way within Go to give goroutines meaningful names in such a way that graphviz-like tools could pick up on it and make meaningful annotations. The runtime would, I suppose, also have to suffix a goroutine ID to a goroutine's name, since calling a function that contained goroutines repeatedly would result in multiple instances of each goroutine. On Fri, 23 Nov 2018 at 22:36, <alex.besogo...@gmail.com> wrote: > Debugging. For example, if I have a deadlocked request I might want to > attach with a debugger and find where exactly it's stuck. > > Right now this is complicated, you have to examine stacks of all > goroutines to find the correct one. > > On Friday, November 23, 2018 at 9:24:42 PM UTC-8, Andrei Avram wrote: >> >> What's the need for this? > > -- > 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+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.