theraot / Theraot

Backporting .NET and more: LINQ expressions in .net 2.0 - nuget Theraot.Core available.
MIT License
162 stars 30 forks source link

TaskCompletionSource.TrySetCanceled fallback to overload without CancellationToken #205

Closed OwnageIsMagic closed 1 year ago

OwnageIsMagic commented 1 year ago

removed bugged netstandard implementation

If token is actually canceled https://github.com/theraot/Theraot/commit/370eb542#diff-b111a79c94d34d7f7ad7d9914d8bb14f03673fd5726182d38e239ab55d1d2bb0L78-R77 introduced infinite recursion. And if token is not canceled it will block until the token is canceled.