diff --git a/src/Microsoft.ML.Core/Utilities/ThreadUtils.cs b/src/Microsoft.ML.Core/Utilities/ThreadUtils.cs index d4f2cec383..6ad2730e2f 100644 --- a/src/Microsoft.ML.Core/Utilities/ThreadUtils.cs +++ b/src/Microsoft.ML.Core/Utilities/ThreadUtils.cs @@ -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(TaskContinuationOptions.RunContinuationsAsynchronously); + var tcs = new TaskCompletionSource(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));