-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: zero value of time.Timer crashes confusingly #8776
Labels
Comments
I don't see why this program should run without any errors. You can't use time.Timer without creating it via NewTimer or a similar function. I agree that the crash is not very useful, and perhaps the documentation could be better. Labels changed: added repo-main, release-none. Status changed to Accepted. |
Related (almost a dup but not quite): issue #8721 about Reset of zero Timer on the playground, where it doesn't crash. The behavior there should be the same. |
I agree with iant. A time.Timer must be created properly. Documented accordingly: https://golang.org/cl/145710043 The likely reason why it's not crashing in the playground is that the playground's runtime code is older (and different) from the one at tip. |
This issue was closed by revision bc89e8c. Status changed to Fixed. |
wheatman
pushed a commit
to wheatman/go-akaros
that referenced
this issue
Jun 25, 2018
Fixes golang#8776. LGTM=bradfitz R=rsc, bradfitz CC=golang-codereviews https://golang.org/cl/145710043
wheatman
pushed a commit
to wheatman/go-akaros
that referenced
this issue
Jun 26, 2018
Fixes golang#8776. LGTM=bradfitz R=rsc, bradfitz CC=golang-codereviews https://golang.org/cl/145710043
wheatman
pushed a commit
to wheatman/go-akaros
that referenced
this issue
Jul 9, 2018
Fixes golang#8776. LGTM=bradfitz R=rsc, bradfitz CC=golang-codereviews https://golang.org/cl/145710043
wheatman
pushed a commit
to wheatman/go-akaros
that referenced
this issue
Jul 30, 2018
Fixes golang#8776. LGTM=bradfitz R=rsc, bradfitz CC=golang-codereviews https://golang.org/cl/145710043
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by [email protected]:
Attachments:
The text was updated successfully, but these errors were encountered: