Skip to content

Commit

Permalink
Merge pull request #172 from InteXX/patch-2
Browse files Browse the repository at this point in the history
Simple grammar tuneup
  • Loading branch information
tillig committed Mar 25, 2023
2 parents a9d4b60 + 58700e7 commit 6478a3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/lifetime/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ As web requests come in, lifetime scopes might look like this:
A rough sequence of events for a web app framework like :doc:`ASP.NET Core <../integration/aspnetcore>` goes like this:

1. When a web request comes in, the web application framework creates a child lifetime scope - the "request lifetime scope."
2. The web application framework resolves the controller instance from the request lifetime scope. Since the controller is registered as "instance per lifetime scope," this instance will be a shared by any components within that request but will not be shared with other requests.
2. The web application framework resolves the controller instance from the request lifetime scope. Since the controller is registered as "instance per lifetime scope," this instance will be shared by any components within that request but will not be shared with other requests.
3. The logging service, registered as a singleton at the application level, gets injected as a dependency into each controller instance.
4. At the end of each web request, the request lifetime scope will be disposed and the controllers will be garbage collected. The logger will remain alive and cached at the root lifetime scope so it can continue to be injected for the rest of the application lifetime.
5. At the end of the web application (during shutdown) the web app framework should dispose of the root container and release the logger.
Expand Down

0 comments on commit 6478a3c

Please sign in to comment.