A few improvements to the promise context system (more coming)
Allow subclassed contexts:
If we have multiple different kinds of a base context, allow `GetContext<Derived>()` to mean `down_cast<Derived*>(GetContext<Base>())` everywhere for brevity.
Allow custom context lookup:
For a base context type, allow customization of how that context is looked up.
These two together allow:
1. normalization of activity lookup and context lookup to the same syntax (so we can write `GetContext<Activity>()` everywhere now
2. Party & Activity to share a context, so that anywhere we need to do a party specific operation we can write `GetContext<Party>()->...` and safely know that it's the current activity *and* it's a party.
Closes #35592
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35592 from ctiller:contextual-types
|
||
|---|---|---|
| .. | ||
| api_reference | ||
| bazelify_tests | ||
| buildgen | ||
| codegen/core | ||
| debug/core | ||
| distrib | ||
| docker_runners | ||
| dockerfile | ||
| doxygen | ||
| fuzzing | ||
| gce | ||
| gcp/utils | ||
| gource | ||
| http2_interop | ||
| internal_ci | ||
| interop_matrix | ||
| package_hosting | ||
| profiling | ||
| release | ||
| remote_build | ||
| run_tests | ||
| README.md | ||
| bazel | ||
| bazel.rc | ||
| fuzztest.bazelrc | ||
README.md
buildgen: Template renderer for our build system.
distrib: Scripts to distribute language-specific packages and other distribution-related helper scripts.
dockerfile: Docker files to test gRPC.
doxygen: gRPC C/C++ documentation generation via Doxygen.
gce: Scripts to help setup testing infrastructure on GCE.
gcp: Helper scripts for interacting with various services on GCP (like Google container engine, BigQuery etc)
internal_ci: Support for running tests on an internal CI platform.
interop_matrix: Scripts to build, upload, and run gRPC clients in docker with various language/runtimes.
jenkins: Support for running tests on Jenkins.
run_tests: Scripts to run gRPC tests in parallel.
run_tests/performance: See the README for more notes on the performance tests.