Currently, impl/prod operates on a base AppEngine Context despite the Context that the user supplies. To reduce the impact of this, an effort is made to copy any Deadline parameters from the user's Context into the derived single-use Context that impl/prod uses to talk to AppEngine.
Unfortunately, this does not copy the Done or cancellable state in the user's Context, making this a bit inconsistent. There isn't really a great way to copy cancellable without spawning a goroutine every time a new operation happens, which seems fairly expensive in performant code. We may be able to handle already-cancelled Contexts, but that is likely not a primary use case.
edit (iannucci): # -> checkboxen
Currently,
impl/prodoperates on a base AppEngineContextdespite theContextthat the user supplies. To reduce the impact of this, an effort is made to copy anyDeadlineparameters from the user'sContextinto the derived single-useContextthatimpl/produses to talk to AppEngine.Unfortunately, this does not copy the
Doneor cancellable state in the user'sContext, making this a bit inconsistent. There isn't really a great way to copy cancellable without spawning a goroutine every time a new operation happens, which seems fairly expensive in performant code. We may be able to handle already-cancelledContexts, but that is likely not a primary use case.selectcan't be built in advance.Contextderivation happens so we can piggyback directly off the user'sContext. I think I prefer this one.edit (iannucci):
#-> checkboxen