dotnet / dotnet-api-docs

.NET API reference documentation (.NET 5+, .NET Core, .NET Framework)
https://docs.microsoft.com/dotnet/api/
Other
718 stars 1.56k forks source link

Describe ConfigureAwait(false) case #6624

Open mrange opened 3 years ago

mrange commented 3 years ago

WRT: https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Threading.Tasks/Task.xml

Everyone uses ConfigureAwait(false) but the docs only mentions the true case and it's quite hard to understand what it implies.

I have seen great blogs on the topic such as: https://devblogs.microsoft.com/dotnet/configureawait-faq/

IMHO the docs should provide meaningful context about this commonly but IMHO poorly understood function.

At least a link to great blogs would be great :)

ghost commented 3 years ago

Tagging subscribers to this area: @carlossanlop See info in area-owners.md if you want to be subscribed.

Issue Details
WRT: https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Threading.Tasks/Task.xml Everyone uses `ConfigureAwait(false)` but the docs only mentions the true case and it's quite hard to understand what it implies. I have seen great blogs on the topic such as: https://devblogs.microsoft.com/dotnet/configureawait-faq/ IMHO the docs should provide meaningful context about this commonly but IMHO poorly understood function. At least a link to great blogs would be great :)
Author: mrange
Assignees: -
Labels: `:watch: Not Triaged`, `Pri3`, `area-System.Threading.Tasks`
Milestone: -
jozkee commented 3 years ago

cc @stephentoub.

MSDN-WhiteKnight commented 3 years ago

What are the specific places where ConfigureAwait(false) should be mentioned? Docs already describe it there: https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task.configureawait?view=netframework-4.8 Maybe it would be good to add see also link to some article that describes what is synchonization context.

And i doubt that "everyone" uses ConfigureAwait(false). Actually it's the least safe option, unless for library developers.