Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

luci/gae prod Context derivation doesn't assume Done or Cancellable state. #59

Open
3 tasks
danjacques opened this issue Sep 16, 2016 · 0 comments
Open
3 tasks

Comments

@danjacques
Copy link
Contributor

danjacques commented Sep 16, 2016

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.

  • use goroutines to reproduce cancellation
  • use a single goroutine to poll all Context's that we care about and signal/callback if they are cancelled (ew). It'd have to be an iterative poll, since a select can't be built in advance.
  • rework how Context derivation happens so we can piggyback directly off the user's Context. I think I prefer this one.

edit (iannucci): # -> checkboxen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant