dotnet / dotnet/docs

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

Open
#47,086 1 comment 0 reactions 0 assignees View on GitHub
:watch: Not Triaged dotnet-fundamentals/svc
Dominant language
No language data
Stars
4.8k
Forks
6.1k
Avg merge
15h 21m
Merged PRs (30d)
370

Description

### 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](https://github.com/dotnet/docs/issues?q=is%3Aissue+is%3Aopen+7fb2be80-cb54-27bf-4f93-423d8540429e)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.