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

VSTHRD002 should allow Task.Wait() within its own continuation #219

Merged
merged 2 commits into from
Feb 27, 2018
Merged

Conversation

AArnott
Copy link
Member

@AArnott AArnott commented Feb 24, 2018

Makes this legal (no diagnostic created):

Task<int> t;
t.ContinueWith(t2 => t2.Result);

Normally accessing Task.Result would produce a VSTHRD002 warning, but in a case like this, it's provably safe because it will never block.

Fixes #217

@AArnott AArnott self-assigned this Feb 24, 2018
@AArnott AArnott changed the base branch from master to v15.7 February 27, 2018 07:18
@AArnott AArnott added this to the v15.7 milestone Feb 27, 2018
@AArnott AArnott merged commit 1ad1bef into v15.7 Feb 27, 2018
@AArnott AArnott deleted the fix217 branch February 27, 2018 21:17
AArnott pushed a commit to AArnott/vs-threading that referenced this pull request Oct 24, 2023
Bumps [xunit](https://github.com/xunit/xunit) from 2.5.0 to 2.5.1.
- [Commits](xunit/xunit@2.5.0...2.5.1)

---
updated-dependencies:
- dependency-name: xunit
  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

Successfully merging this pull request may close these issues.

None yet

2 participants