You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
private async Task Wrapper()
{
await Task.Run(cpuBoundJob);
return;
void cpuBoundJob()
{
using var memoryStream = new MemoryStream();
using var gzipStream = new GZipStream(memoryStream, CompressionMode.Compress, true);
// do work
gzipStream.Flush(); // AsyncFixer02: FlushAsync should be used instead of gzipStream.Flush.
}
}
Expect
No warning, the local function is synchronous and await doesn't work in it.
Actual
AsyncFixer02: FlushAsync should be used instead of gzipStream.Flush.