Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VSTHRD003 should flag awaiting Task from fields #254

Closed
AArnott opened this issue Apr 30, 2018 · 0 comments
Closed

VSTHRD003 should flag awaiting Task from fields #254

AArnott opened this issue Apr 30, 2018 · 0 comments

Comments

@AArnott
Copy link
Member

AArnott commented Apr 30, 2018

The following does not produce a diagnostic from VSTHRD003:

class Program
{
    static Task t;
    static JoinableTaskFactory jtf;

    static void Main(string[] args)
    {
        jtf.Run(async delegate
        {
            await t;
        });
    }
}

It seems VSTHRD003 only triggers when the Task is a local variable.

sharwell added a commit to sharwell/vs-threading that referenced this issue Aug 6, 2018
sharwell added a commit to sharwell/vs-threading that referenced this issue Aug 7, 2018
sharwell added a commit to sharwell/vs-threading that referenced this issue Aug 8, 2018
AArnott pushed a commit that referenced this issue Feb 20, 2024
Bumps [xunit.runner.visualstudio](https://github.com/xunit/visualstudio.xunit) from 2.5.6 to 2.5.7.
- [Release notes](https://github.com/xunit/visualstudio.xunit/releases)
- [Commits](xunit/visualstudio.xunit@2.5.6...2.5.7)

---
updated-dependencies:
- dependency-name: xunit.runner.visualstudio
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant