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

Unified Diff: impl/prod/context_vm.go

Issue 1630833002: Add UseBackground. (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: Make BackgroundContext only available on managed VMs, document Created 4 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/prod/context_vm.go
diff --git a/impl/prod/context_vm.go b/impl/prod/context_vm.go
new file mode 100644
index 0000000000000000000000000000000000000000..64459d8aeff0ee48cf5aa929a0ea3ffeee149fe8
--- /dev/null
+++ b/impl/prod/context_vm.go
@@ -0,0 +1,20 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// +build !appengine
+
+package prod
+
+import (
+ "golang.org/x/net/context"
+ "google.golang.org/appengine"
+)
+
+// UseBackground is the same as Use except that it activates production
+// implementations which aren't associated with any particular request.
+//
+// This is only available on Managed VMs.
+func UseBackground(c context.Context) context.Context {
+ return setupAECtx(c, appengine.BackgroundContext())
+}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698