when disposing the sp, it should be able to signal its scopes to dispose early via a cancellation token.
If running within a request scope, such as an mvc controller method, this could be done by:
Middleware extending following cancellation token
HttpContext.RequestAborted
To one that will also be triggered on IServiceProvider.DisposeAsync.
Or in the case of a background job, when creating a scope, cast the scope to ICancellableScope to get the access token, or perhaps consider making it possible to just resolve an ICancellationToken?
when disposing the sp, it should be able to signal its scopes to dispose early via a cancellation token.
If running within a request scope, such as an mvc controller method, this could be done by:
Middleware extending following cancellation token
To one that will also be triggered on IServiceProvider.DisposeAsync.
Or in the case of a background job, when creating a scope, cast the scope to ICancellableScope to get the access token, or perhaps consider making it possible to just resolve an ICancellationToken?