dotnet / dotnet/dotnet-api-docs

The `Task.Wait` note should be copied to `Task.WaitAsync`

Offen
#11,202 1 Kommentar 1 Reaktion 1 zugewiesene Person Beansprucht von @antonfirsov Auf GitHub ansehen
area-System.Threading.Tasks
Vorherrschende Sprache
C#
Sterne
949
Forks
1.7k
Ø Merge
2 T. 19 Std.
Gemergte PRs (30 T.)
52

Beschreibung

See https://github.com/dotnet/runtime/pull/114689#issuecomment-2813021799.

Also nice to have:
- Improve the visibility of the notes if possible.
- Mention that exceptions may leak to `TaskScheduler.UnobservedTaskException` .
- The example should demonstrate how to observe and log exceptions.
- The `Task.Wait` example can be shortened and modernized (eg. why to start a `Thread` to cancel a `CancellationTokenSource` ?)

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.