-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V4: Use a better go-routine management pattern #281
Comments
Just read this issue and #282 and had a random idea, which may or may not be useful: Go since 1.9 supports profiler labels which can be used to tag goroutines with key=value pairs. These are meant to help when profiling, but are also used by tools like Goland to label goroutines when debugging. The last time I tried debugging a test failure in radix at one point I had to switch between goroutines and I wasted time finding the correct since I had to look at each goroutine until I found the correct one. Since I mainly use Goland, having labels could have made this easier, though you can also use them with other editors since this is just a feature of the delve debugger. Unfortunately these labels are not part of stack traces, though they should be available when looking at crash dumps. Considering this, what do you think about adding labels to Goroutines could also have other, additional labels, though since these are optional, the goroutines could just set these themselves. |
That sounds like a good idea, and should be easy enough to incorporate into a new |
The current pattern that the internal
proc
package uses is restrictive in a few ways. It would be better to use a pattern more like github.com/oklog/run, which has all go-routines in a group close themselves when one of them exits. I don't think we need to use that actual package, but rather can just fixupproc
to use that pattern instead.The text was updated successfully, but these errors were encountered: