Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2330)

Unified Diff: appengine/memlock/memlock.go

Issue 1679023005: Add Context cancellation to clock. (Closed) Base URL: https://github.com/luci/luci-go@master
Patch Set: Much more invasive, cancel by default, remove meter package. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | common/clock/clock.go » ('j') | common/clock/clockcontext_test.go » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/memlock/memlock.go
diff --git a/appengine/memlock/memlock.go b/appengine/memlock/memlock.go
index b0f14f5c663f5b579f1f53989469ccdd6522799d..fb64bc8e711b1a60adf57a4e5071c834061137d9 100644
--- a/appengine/memlock/memlock.go
+++ b/appengine/memlock/memlock.go
@@ -157,7 +157,7 @@ func TryWithLock(ctx context.Context, key, clientID string, f func(context.Conte
select {
case <-subCtx.Done():
break checkLoop
- case <-clock.Get(ctx).After(delay):
+ case <-clock.Get(ctx).After(ctx, delay):
}
if !checkAnd(refresh) {
log.Warningf("lost lock: %s", err)
« no previous file with comments | « no previous file | common/clock/clock.go » ('j') | common/clock/clockcontext_test.go » ('J')

Powered by Google App Engine
This is Rietveld 408576698