{
"id": "cs-sync-over-async",
"language": "csharp",
"group": "performance",
"listingTitle": "Avoid synchronously waiting on C# tasks",
"title": "Avoid synchronously waiting on C# tasks",
"mvvm": false,
"defaultSeverity": "warn",
"legacyGroup": "performance",
"why": "Blocking on Task.Result or Wait ties up a thread and can deadlock when continuations need the captured synchronization context.",
"suggestion": "Make the caller async and await the task so the thread can return to the scheduler.",
"version": 6,
"semanticMaturity": "token",
"securityKind": "none",
"taxonomy": [
"performance"
],
"requirements": [
"sourceText"
],
"packs": [
"csharp"
],
"implementation": "src/languages/csharp/rules.rs",
"languages": [
"csharp"
],
"frameworks": [],
"languageVersions": [],
"limitations": [
"GetAwaiter().GetResult() is reported directly; Result and Wait require an explicitly typed Task or ValueTask receiver, or a local var assigned directly from an unawaited Async-suffixed call.",
"Result guarded by a nearby IsCompleted check is excluded; aliases, wrappers, and task types hidden behind interfaces are not inferred."
]
}