Skip to main content

What it flags

A synchronous wait on a Task can block the async method’s thread. The initial check recognizes Task parameters declared with the qualified type or a System.Threading.Tasks import. It skips waits in nested synchronous functions, known test paths, and positive completion guards recognized from IsCompleted or IsCompletedSuccessfully. A directly preceding await of the same parameter, or an earlier await Task.WhenAll(...) in the same block that lists it, also establishes completion.