Skip to content

There is no clear indication whether resolving services from DI is thread safe #47086

Open
@petrroll

Description

@petrroll

Type of issue

Missing information

Description

While there're tips for how to deal with thread safety in our code (singletons) and information about the guaranteed of them being created, there's no general info about whether DI resolving is or isn't thread safe. And I couldn't find it anywhere else either.

It seems it's kinda naturally implied that it must be (and duh, it must be) but it should be very explicitly said somewhere.

Page URL

https://learn.microsoft.com/en-us/dotnet/core/extensions/dependency-injection-guidelines

Content source URL

https://github.com/dotnet/docs/blob/main/docs/core/extensions/dependency-injection-guidelines.md

Document Version Independent Id

7fb2be80-cb54-27bf-4f93-423d8540429e

Platform Id

df1bff59-742c-a7b3-cfc6-4fc1f6510458

Article author

@IEvangelist

Metadata

  • ID: 8d1c8ef1-6a01-df24-34ad-570f88df9303
  • PlatformId: df1bff59-742c-a7b3-cfc6-4fc1f6510458
  • Service: dotnet-fundamentals

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions