From 86c4b7209ef2771bb2a5c97cb71ba9822dfa945f Mon Sep 17 00:00:00 2001 From: aarzilli Date: Thu, 6 Dec 2018 10:42:59 +0100 Subject: [PATCH] service: improve documentation of ListGoroutines Describe how the Start and Count parameters of ListGoroutines are used. --- service/rpc2/server.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/service/rpc2/server.go b/service/rpc2/server.go index 9e11018a..32feb9a2 100644 --- a/service/rpc2/server.go +++ b/service/rpc2/server.go @@ -518,6 +518,11 @@ type ListGoroutinesOut struct { } // ListGoroutines lists all goroutines. +// If Count is specified ListGoroutines will return at the first Count +// goroutines and an index in Nextg, that can be passed as the Start +// parameter, to get more goroutines from ListGoroutines. +// Passing a value of Start that wasn't returned by ListGoroutines will skip +// an undefined number of goroutines. func (s *RPCServer) ListGoroutines(arg ListGoroutinesIn, out *ListGoroutinesOut) error { gs, nextg, err := s.debugger.Goroutines(arg.Start, arg.Count) if err != nil {