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

Issue 4063043: code review 4063043: time: allow cancelling of After events. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 10 months ago by rog
Modified:
10 years, 10 months ago
Reviewers:
CC:
r, niemeyer, r2, golang-dev
Visibility:
Public.

Description

time: allow cancelling of After events. Also simplify sleeper algorithm and poll occasionally so redundant sleeper goroutines will quit sooner.

Patch Set 1 #

Patch Set 2 : code review 4063043: time: allow cancelling of After events. #

Patch Set 3 : code review 4063043: time: allow cancelling of After events. #

Patch Set 4 : code review 4063043: time: allow cancelling of After events. #

Patch Set 5 : code review 4063043: time: allow cancelling of After events. #

Patch Set 6 : code review 4063043: time: allow cancelling of After events. #

Patch Set 7 : code review 4063043: time: allow cancelling of After events. #

Patch Set 8 : code review 4063043: time: allow cancelling of After events. #

Patch Set 9 : code review 4063043: time: allow cancelling of After events. #

Patch Set 10 : code review 4063043: time: allow cancelling of After events. #

Patch Set 11 : code review 4063043: time: allow cancelling of After events. #

Patch Set 12 : code review 4063043: time: allow cancelling of After events. #

Total comments: 8

Patch Set 13 : code review 4063043: time: allow cancelling of After events. #

Patch Set 14 : code review 4063043: time: allow cancelling of After events. #

Patch Set 15 : code review 4063043: time: allow cancelling of After events. #

Patch Set 16 : code review 4063043: time: allow cancelling of After events. #

Patch Set 17 : code review 4063043: time: allow cancelling of After events. #

Patch Set 18 : code review 4063043: time: allow cancelling of After events. #

Total comments: 20

Patch Set 19 : code review 4063043: time: allow cancelling of After events. #

Patch Set 20 : code review 4063043: time: allow cancelling of After events. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+170 lines, -71 lines) Patch
M src/pkg/time/sleep.go View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +123 lines, -71 lines 0 comments Download
M src/pkg/time/sleep_test.go View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +36 lines, -0 lines 0 comments Download
M src/pkg/time/tick_test.go View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 21
rog
Hello r, niemeyer (cc: golang-dev@googlegroups.com), I'd like you to review this change.
10 years, 10 months ago (2011-01-19 11:09:11 UTC) #1
niemeyer
This looks interesting overall. As a name, Stop seems fine, since that's already used by ...
10 years, 10 months ago (2011-01-19 13:03:07 UTC) #2
rog
On 19 January 2011 13:03, <n13m3y3r@gmail.com> wrote: > This looks interesting overall. > > As ...
10 years, 10 months ago (2011-01-19 13:10:52 UTC) #3
niemeyer
If events are being serviced very quickly there's no advantage in stopping them in terms ...
10 years, 10 months ago (2011-01-19 13:32:19 UTC) #4
rog
PTAL. BTW one other possibility is to have After return a *Timer, and to have ...
10 years, 10 months ago (2011-01-19 13:32:57 UTC) #5
rog
On 19 January 2011 13:32, <n13m3y3r@gmail.com> wrote: > If events are being serviced very quickly ...
10 years, 10 months ago (2011-01-19 13:42:36 UTC) #6
rog
Hello r, niemeyer (cc: golang-dev@googlegroups.com), Please take another look.
10 years, 10 months ago (2011-01-19 14:20:10 UTC) #7
rog
here's an odd anomaly: running gotest -benchmarks . in pkg/time results in all the concurrent ...
10 years, 10 months ago (2011-01-19 14:57:03 UTC) #8
niemeyer
http://codereview.appspot.com/4063043/diff/33001/src/pkg/time/sleep.go File src/pkg/time/sleep.go (right): http://codereview.appspot.com/4063043/diff/33001/src/pkg/time/sleep.go#newcode16 src/pkg/time/sleep.go:16: // the current time will be sent on C; ...
10 years, 10 months ago (2011-01-19 15:58:46 UTC) #9
rog
http://codereview.appspot.com/4063043/diff/33001/src/pkg/time/sleep.go File src/pkg/time/sleep.go (right): http://codereview.appspot.com/4063043/diff/33001/src/pkg/time/sleep.go#newcode16 src/pkg/time/sleep.go:16: // the current time will be sent on C; ...
10 years, 10 months ago (2011-01-19 16:25:08 UTC) #10
niemeyer
> The only way that heap can remove items from the heap is through > ...
10 years, 10 months ago (2011-01-19 16:46:24 UTC) #11
rog
On 19 January 2011 16:46, <n13m3y3r@gmail.com> wrote: > >> The only way that heap can ...
10 years, 10 months ago (2011-01-19 17:15:21 UTC) #12
niemeyer
> i wouldn't say it's necessarily a bug. why is 500 years in the future ...
10 years, 10 months ago (2011-01-19 17:28:31 UTC) #13
rog
On 19 January 2011 17:28, <n13m3y3r@gmail.com> wrote: > >> i wouldn't say it's necessarily a ...
10 years, 10 months ago (2011-01-19 18:27:43 UTC) #14
rog
PTAL
10 years, 10 months ago (2011-01-20 17:26:44 UTC) #15
r
http://codereview.appspot.com/4063043/diff/53001/src/pkg/time/sleep.go File src/pkg/time/sleep.go (right): http://codereview.appspot.com/4063043/diff/53001/src/pkg/time/sleep.go#newcode15 src/pkg/time/sleep.go:15: // When the Timer was created with NewTimer, s/When/If/ ...
10 years, 10 months ago (2011-01-21 19:26:53 UTC) #16
rog
http://codereview.appspot.com/4063043/diff/53001/src/pkg/time/sleep.go File src/pkg/time/sleep.go (right): http://codereview.appspot.com/4063043/diff/53001/src/pkg/time/sleep.go#newcode15 src/pkg/time/sleep.go:15: // When the Timer was created with NewTimer, A ...
10 years, 10 months ago (2011-01-21 19:38:33 UTC) #17
r
http://codereview.appspot.com/4063043/diff/53001/src/pkg/time/sleep.go File src/pkg/time/sleep.go (right): http://codereview.appspot.com/4063043/diff/53001/src/pkg/time/sleep.go#newcode15 src/pkg/time/sleep.go:15: // When the Timer was created with NewTimer, it's ...
10 years, 10 months ago (2011-01-21 19:47:38 UTC) #18
rog
PTAL http://codereview.appspot.com/4063043/diff/53001/src/pkg/time/sleep.go File src/pkg/time/sleep.go (right): http://codereview.appspot.com/4063043/diff/53001/src/pkg/time/sleep.go#newcode15 src/pkg/time/sleep.go:15: // When the Timer was created with NewTimer, ...
10 years, 10 months ago (2011-01-24 14:01:10 UTC) #19
r2
LGTM
10 years, 10 months ago (2011-01-25 20:21:56 UTC) #20
r
10 years, 10 months ago (2011-01-25 20:25:55 UTC) #21
*** Submitted as http://code.google.com/p/go/source/detail?r=c1d8b16efebd ***

time: allow cancelling of After events.
Also simplify sleeper algorithm and poll
occasionally so redundant sleeper goroutines
will quit sooner.

R=r, niemeyer, r2
CC=golang-dev
http://codereview.appspot.com/4063043

Committer: Rob Pike <r@golang.org>
Sign in to reply to this message.

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