Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Add test for wait on task with synchronously scheduled continuations - #7055

Merged
stephentoub merged 1 commit into
dotnet:masterfrom
jkotas:task-wait-test
Mar 19, 2016
Merged

stephentoub merged 1 commit into
dotnet:masterfrom
jkotas:task-wait-test

Conversation

@jkotas

@jkotas jkotas commented Mar 19, 2016

Copy link
Copy Markdown
Member

@jkotas

jkotas commented Mar 19, 2016

Copy link
Copy Markdown
Member Author

I have noticed this because of the fix for this bug is missing in the CoreRT clone of System.Threading.Tasks. I will add the fix there as well.

@jkotas

jkotas commented Mar 19, 2016

Copy link
Copy Markdown
Member Author

@stephentoub PTLA

while (!cts.IsCancellationRequested)
{
Task.Delay(1).Wait();
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could just be:

cts.WaitHandle.WaitOne();

or rather than using a CTS, a ManualResetEventSlim could be used directly.

@stephentoub

Copy link
Copy Markdown
Member

A few nits, otherwise LGTM. Thanks for adding it.

@jkotas

jkotas commented Mar 19, 2016

Copy link
Copy Markdown
Member Author

Incorporated feedback

@stephentoub

Copy link
Copy Markdown
Member

LGTM. Thanks, Jan.

dotnet-bot pushed a commit to dotnet-bot/corert that referenced this pull request Mar 19, 2016
…nuations

Port of bug fix that was made in full framework and CoreCLR a few years ago (TFS change #681661), but was missed for .NET Native / CoreRT.

Regression test: dotnet/corefx#7055

[tfs-changeset: 1587869]
stephentoub added a commit that referenced this pull request Mar 19, 2016
Add test for wait on task with synchronously scheduled continuations
@stephentoub
stephentoub merged commit f1d6b8b into dotnet:master Mar 19, 2016
@jkotas
jkotas deleted the task-wait-test branch March 20, 2016 04:06
@karelz karelz modified the milestone: 1.0.0-rtm Dec 3, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants