|
Add Context cancellation to clock.
Add Context cancellation to the clock package methods. Effectively this
makes it so that Clock methods (Sleep, After, Timer) will terminate
early if their supplied Context is canceled.
Update other packages to accommodate this. This update includes:
- Update "ackbuffer" to not use the "meter" package.
- Add a "TakeAll" method to parallel's Semaphore, which takes all
instances of the semaphore. This is effectively a Join on the Semaphore.
- Remove the "meter" package. This is easier than fixing its tests, and
(with "ackbuffer" out of the way) all of the uses that originally
inspired it have switched to more custom methods.
R=iannucci@chromium.org, vadimsh@chromium.org
BUG=
Committed: https://github.com/luci/luci-go/commit/86e9094387fea7e47efe06fba090fe3118f66650
Total comments: 2
Total comments: 5
Total comments: 2
Total comments: 38
Total comments: 8
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+837 lines, -823 lines) |
Patch |
 |
M |
appengine/memlock/memlock.go
|
View
|
1
2
|
1 chunk |
+2 lines, -5 lines |
0 comments
|
Download
|
 |
M |
common/clock/clock.go
|
View
|
1
2
3
4
|
2 chunks |
+17 lines, -4 lines |
0 comments
|
Download
|
 |
M |
common/clock/clockcontext.go
|
View
|
1
|
1 chunk |
+2 lines, -5 lines |
0 comments
|
Download
|
 |
M |
common/clock/clockcontext_test.go
|
View
|
1
2
|
1 chunk |
+97 lines, -79 lines |
0 comments
|
Download
|
 |
M |
common/clock/external.go
|
View
|
1
2
3
4
5
|
3 chunks |
+7 lines, -10 lines |
0 comments
|
Download
|
 |
M |
common/clock/external_test.go
|
View
|
1
2
|
3 chunks |
+9 lines, -8 lines |
0 comments
|
Download
|
 |
M |
common/clock/systemclock.go
|
View
|
1
2
3
4
|
2 chunks |
+11 lines, -6 lines |
0 comments
|
Download
|
 |
A |
common/clock/systemclock_test.go
|
View
|
1
2
3
4
|
1 chunk |
+47 lines, -0 lines |
0 comments
|
Download
|
 |
M |
common/clock/systemtimer.go
|
View
|
1
2
3
4
|
1 chunk |
+60 lines, -12 lines |
0 comments
|
Download
|
 |
M |
common/clock/systemtimer_test.go
|
View
|
1
2
3
4
|
3 chunks |
+54 lines, -19 lines |
0 comments
|
Download
|
 |
A |
common/clock/tags.go
|
View
|
1
2
3
4
5
|
1 chunk |
+28 lines, -0 lines |
0 comments
|
Download
|
 |
A |
common/clock/tags_test.go
|
View
|
1
|
1 chunk |
+39 lines, -0 lines |
0 comments
|
Download
|
 |
M |
common/clock/testclock/testclock.go
|
View
|
1
2
3
4
|
6 chunks |
+46 lines, -29 lines |
0 comments
|
Download
|
 |
M |
common/clock/testclock/testclock_test.go
|
View
|
1
2
3
4
|
2 chunks |
+28 lines, -13 lines |
0 comments
|
Download
|
 |
M |
common/clock/testclock/testtimer.go
|
View
|
1
2
3
4
|
3 chunks |
+67 lines, -20 lines |
0 comments
|
Download
|
 |
M |
common/clock/testclock/testtimer_test.go
|
View
|
1
2
3
4
|
4 chunks |
+163 lines, -17 lines |
0 comments
|
Download
|
 |
M |
common/clock/timer.go
|
View
|
1
2
3
4
|
1 chunk |
+25 lines, -5 lines |
0 comments
|
Download
|
 |
M |
common/gcloud/pubsub/ackbuffer/ackbuffer.go
|
View
|
1
2
3
4
|
4 chunks |
+78 lines, -37 lines |
0 comments
|
Download
|
 |
M |
common/gcloud/pubsub/ackbuffer/ackbuffer_test.go
|
View
|
1
|
5 chunks |
+48 lines, -29 lines |
0 comments
|
Download
|
 |
M |
common/gcloud/pubsub/subscriber/subscriber.go
|
View
|
1
|
1 chunk |
+1 line, -14 lines |
0 comments
|
Download
|
 |
D |
common/meter/config.go
|
View
|
1
|
1 chunk |
+0 lines, -59 lines |
0 comments
|
Download
|
 |
D |
common/meter/config_test.go
|
View
|
1
|
1 chunk |
+0 lines, -33 lines |
0 comments
|
Download
|
 |
D |
common/meter/doc.go
|
View
|
1
|
1 chunk |
+0 lines, -10 lines |
0 comments
|
Download
|
 |
D |
common/meter/meter.go
|
View
|
1
|
1 chunk |
+0 lines, -213 lines |
0 comments
|
Download
|
 |
D |
common/meter/meter_test.go
|
View
|
1
|
1 chunk |
+0 lines, -196 lines |
0 comments
|
Download
|
 |
M |
common/parallel/semaphore.go
|
View
|
1
|
1 chunk |
+8 lines, -0 lines |
0 comments
|
Download
|
Total messages: 23 (5 generated)
|