Use case
With AsyncMiddlewareFrame (PR 2) and _registered_api_adapter_async (PR 3) in place, we need to wire them into the actual resolve chain. This adds the async versions of _resolve() and _call_route() as private methods - the full async pipeline without exposing it to customers yet.
Solution/User Experience
- Add
_resolve_async() - async version of _resolve(). Same route matching logic (sync, CPU-bound), but calls _call_route_async() instead of _call_route()
- Add
_call_route_async() - builds async middleware chain using AsyncMiddlewareFrame with _registered_api_adapter_async as the final frame, then awaits the chain
- Add
_build_middleware_stack_async() on Route - mirrors _build_middleware_stack() but returns an async chain
- Integration tests with async handlers going through the full chain
- Methods are private - not exposed to customers yet
Alternative solutions
Acknowledgment
Use case
With
AsyncMiddlewareFrame(PR 2) and_registered_api_adapter_async(PR 3) in place, we need to wire them into the actual resolve chain. This adds the async versions of_resolve()and_call_route()as private methods - the full async pipeline without exposing it to customers yet.Solution/User Experience
_resolve_async()- async version of_resolve(). Same route matching logic (sync, CPU-bound), but calls_call_route_async()instead of_call_route()_call_route_async()- builds async middleware chain usingAsyncMiddlewareFramewith_registered_api_adapter_asyncas the final frame, then awaits the chain_build_middleware_stack_async()onRoute- mirrors_build_middleware_stack()but returns an async chainAlternative solutions
Acknowledgment