MCPcopy Create free account
hub / github.com/golang/appengine / RunInBackground

Function RunInBackground

runtime/runtime.go:135–143  ·  view source on GitHub ↗

RunInBackground runs f in a background goroutine in this process. f is provided a context that may outlast the context provided to RunInBackground. This is only valid to invoke from a service set to basic or manual scaling.

(c context.Context, f func(c context.Context))

Source from the content-addressed store, hash-verified

133// f is provided a context that may outlast the context provided to RunInBackground.
134// This is only valid to invoke from a service set to basic or manual scaling.
135func RunInBackground(c context.Context, f func(c context.Context)) error {
136 req := &pb.StartBackgroundRequestRequest{}
137 res := &pb.StartBackgroundRequestResponse{}
138 if err := internal.Call(c, "system", "StartBackgroundRequest", req, res); err != nil {
139 return err
140 }
141 sendc <- send{res.GetRequestId(), f}
142 return nil
143}
144
145func init() {
146 internal.RegisterErrorCodeMap("system", pb.SystemServiceError_ErrorCode_name)

Callers 1

testRunInBackgroundFunction · 0.70

Calls 2

GetRequestIdMethod · 0.95
CallFunction · 0.92

Tested by 1

testRunInBackgroundFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…