I'm implementing some advanced scenario where I think I need TaskCompletionSource
:
var tcs = new TaskCompletionSource<object>(null, TaskCreationOptions.LongRunning);
The code fails on my machine:
System.ArgumentOutOfRangeException: 'Specified argument was out of the range of valid values. Parameter name: creationOptions'
I tried targeting different .NET Framework versions without any luck. What am I doing wrong?