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

proposal: runtime: delete Stack #3845

Open
robpike opened this Issue Jul 20, 2012 · 6 comments

Comments

Projects
None yet
4 participants
@robpike
Contributor

robpike commented Jul 20, 2012

Now that runtime.Stack exists, its value added is pretty small. Maybe for Go 2.
@rsc

This comment has been minimized.

Contributor

rsc commented Jul 30, 2013

Comment 2:

Labels changed: added go2.

@rsc

This comment has been minimized.

Contributor

rsc commented Dec 4, 2013

Comment 3:

Labels changed: added repo-main.

@rsc

This comment has been minimized.

Contributor

rsc commented Mar 3, 2014

Comment 4:

Adding Release=None to all Priority=Someday bugs.

Labels changed: added release-none.

@rsc rsc added this to the Unplanned milestone Apr 10, 2015

@rsc

This comment has been minimized.

Contributor

rsc commented Jun 17, 2017

In Go 1.6 we changed debug.Stack to be a convenience wrapper around runtime.Stack, for #12363. Whereas runtime.Stack requires passing an allocated buffer at the call site, debug.Stack takes care of allocation and also of making sure the buffer is bug enough to hold the complete stack.

Leaving this open but note that now debug.Stack is actually nicer than runtime.Stack. If we're going to remove one, it might make sense to unexport runtime.Stack instead.

@rsc rsc changed the title from runtime/debug: delete Stack to proposal: runtime/debug: delete Stack Jun 17, 2017

@robpike

This comment has been minimized.

Contributor

robpike commented Jun 17, 2017

That sounds like the right answer now.

@ianlancetaylor ianlancetaylor added Go2Cleanup and removed Thinking labels Dec 5, 2017

@ianlancetaylor ianlancetaylor changed the title from proposal: runtime/debug: delete Stack to proposal: runtime: delete Stack Jun 5, 2018

@bradfitz

This comment has been minimized.

Member

bradfitz commented Oct 16, 2018

debug.Stack only returns the current goroutine, though.

If runtime.Stack is removed, how would one implement, say, a /debug/goroutinez debug endpoint?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment