Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(207)

Issue 137350043: code review 137350043: sync/once: panicking functions still marked as complete (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 8 months ago by r
Modified:
9 years, 8 months ago
Reviewers:
dvyukov, josharian
CC:
golang-codereviews, dvyukov
Visibility:
Public.

Description

sync/once: panicking functions still marked as complete This is a corner case, and one that was even tested, but this CL changes the behavior to say that f is "complete" even if it panics. But don't think of it that way, think of it as sync.Once runs the function only the first time it is called, rather than repeatedly until a run of the function completes. Fixes issue 8118.

Patch Set 1 #

Patch Set 2 : diff -r 862455e0916342f59979ccfdcedd35d5fca48cb1 https://code.google.com/p/go #

Patch Set 3 : diff -r 59fb8415a560343b9d73cb7a5fc0f40dc26e16a0 https://code.google.com/p/go #

Patch Set 4 : diff -r e423b2f2d361065a26557d4375f4716f668b3fac https://code.google.com/p/go #

Total comments: 2

Patch Set 5 : diff -r 38f88b06704247749b469a2c9149ef5b35230cad https://code.google.com/p/go #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -4 lines) Patch
M src/sync/once.go View 1 3 chunks +5 lines, -2 lines 2 comments Download
M src/sync/once_test.go View 1 chunk +6 lines, -2 lines 0 comments Download

Messages

Total messages: 9
r
Hello golang-codereviews@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go
9 years, 8 months ago (2014-09-08 19:44:32 UTC) #1
r
Hello golang-codereviews@googlegroups.com (cc: golang-codereviews@googlegroups.com), Please take another look.
9 years, 8 months ago (2014-09-08 20:09:10 UTC) #2
r
Hello golang-codereviews@googlegroups.com (cc: golang-codereviews@googlegroups.com), Please take another look.
9 years, 8 months ago (2014-09-09 18:49:31 UTC) #3
r
Hello golang-codereviews@googlegroups.com (cc: golang-codereviews@googlegroups.com), Please take another look.
9 years, 8 months ago (2014-09-16 20:42:40 UTC) #4
dvyukov
LGTM
9 years, 8 months ago (2014-09-16 20:57:51 UTC) #5
r
*** Submitted as https://code.google.com/p/go/source/detail?r=e83e04e2de8a *** sync/once: panicking functions still marked as complete This is a ...
9 years, 8 months ago (2014-09-16 20:59:40 UTC) #6
josharian
LGTM with nits https://codereview.appspot.com/137350043/diff/60001/src/sync/once_test.go File src/sync/once_test.go (right): https://codereview.appspot.com/137350043/diff/60001/src/sync/once_test.go#newcode42 src/sync/once_test.go:42: func TestOncePanic(t *testing.T) { This could ...
9 years, 8 months ago (2014-09-16 21:09:50 UTC) #7
r
https://codereview.appspot.com/137350043/diff/80001/src/sync/once.go File src/sync/once.go (right): https://codereview.appspot.com/137350043/diff/80001/src/sync/once.go#newcode32 src/sync/once.go:32: // If f panics, Do considers it to have ...
9 years, 8 months ago (2014-09-16 21:12:25 UTC) #8
r
9 years, 8 months ago (2014-09-16 21:13:04 UTC) #9
Message was sent while issue was closed.
https://codereview.appspot.com/137350043/diff/60001/src/sync/once_test.go
File src/sync/once_test.go (right):

https://codereview.appspot.com/137350043/diff/60001/src/sync/once_test.go#new...
src/sync/once_test.go:42: func TestOncePanic(t *testing.T) {
Nice. Send a CL please?
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b