Skip to content
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

time: playground doesn't crash on Reset of zero time.TImer #8721

Closed
bradfitz opened this issue Sep 13, 2014 · 7 comments
Closed

time: playground doesn't crash on Reset of zero time.TImer #8721

bradfitz opened this issue Sep 13, 2014 · 7 comments
Milestone

Comments

@bradfitz
Copy link
Contributor

This program crashes at Go 1.3 and Go tip (to be 1.4), but doesn't crash on the Go 1.3
playground:

https://play.golang.org/p/earSjQISp8

Instead, it ends successfully.

That led a reporter on golang-dev to conclude that it should work outside of the
playground.

Perhaps Reset, etc should panic if the Timer's runtimeTimer is zero.

Or it should work outside of the playground.

Or be documented as-is.
@bradfitz
Copy link
Contributor Author

Comment 1:

The original reporter of this bug has additional feedback at
https://groups.google.com/forum/#!topic/golang-dev/Dhv4g-PWuho but doesn't have a Google
account to post it here.

@bradfitz
Copy link
Contributor Author

Comment 2:

OP has filed issue #8776 for the non-playground bug

@griesemer
Copy link
Contributor

Comment 3:

Addressed issue #8776 (better documentation). Should verify that behavior is consistent
once we upgrade the playground's runtime.

@dvyukov
Copy link
Member

dvyukov commented Oct 21, 2014

Comment 4:

Issue #8967 has been merged into this issue.

@gopherbot
Copy link

Comment 5:

CL https://golang.org/cl/155620045 mentions this issue.

@bradfitz
Copy link
Contributor Author

Comment 6:

This issue was closed by revision ab4af52.

Status changed to Fixed.

@rsc
Copy link
Contributor

rsc commented Oct 21, 2014

Comment 7:

Note that if you want a stopped channel timer you can restart with Reset, just use
t := time.NewTimer(0)
t.Stop()
to set it up.

@rsc rsc added this to the Go1.4 milestone Apr 14, 2015
@rsc rsc removed the release-go1.4 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jun 25, 2018
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jun 26, 2018
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jul 9, 2018
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jul 20, 2018
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jul 30, 2018
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants