Skip to content

Fix erroneous use of TaskContinuationOptions in ThreadUtils.cs #5753

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

Merged
merged 1 commit into from
May 4, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Microsoft.ML.Core/Utilities/ThreadUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ private static Task QueueAsync(Delegate threadStart, object state)
// Call sites only care about completion, not about the distinction between
// success and failure and do not expect exceptions to be propagated in this manner,
// so only SetResult is used.
var tcs = new TaskCompletionSource<bool>(TaskContinuationOptions.RunContinuationsAsynchronously);
var tcs = new TaskCompletionSource<bool>(TaskCreationOptions.RunContinuationsAsynchronously);

// Queue the work for a thread to pick up. If no thread is immediately available, it will create one.
Enqueue((threadStart, state, tcs));
Expand Down