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

Comments

Projects
None yet
5 participants
@bradfitz
Copy link
Member

commented Sep 13, 2014

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

This comment has been minimized.

Copy link
Member Author

commented Sep 13, 2014

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

This comment has been minimized.

Copy link
Member Author

commented Sep 19, 2014

Comment 2:

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

This comment has been minimized.

Copy link
Contributor

commented Oct 1, 2014

Comment 3:

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

This comment has been minimized.

Copy link
Member

commented Oct 21, 2014

Comment 4:

Issue #8967 has been merged into this issue.

@gopherbot

This comment has been minimized.

Copy link

commented Oct 21, 2014

Comment 5:

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

This comment has been minimized.

Copy link
Member Author

commented Oct 21, 2014

Comment 6:

This issue was closed by revision ab4af52.

Status changed to Fixed.

@rsc

This comment has been minimized.

Copy link
Contributor

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.

@bradfitz bradfitz added fixed labels Oct 21, 2014

@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 added a commit to wheatman/go-akaros that referenced this issue Jun 25, 2018

wheatman added a commit to wheatman/go-akaros that referenced this issue Jun 26, 2018

wheatman added a commit to wheatman/go-akaros that referenced this issue Jul 9, 2018

wheatman added a commit to wheatman/go-akaros that referenced this issue Jul 20, 2018

wheatman added 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.
You can’t perform that action at this time.