microsoft / testfx

MSTest framework and adapter
MIT License
721 stars 253 forks source link

use `ValueTask` instead of `Task` if possible #3474

Open MarcoRossignoli opened 1 month ago

MarcoRossignoli commented 1 month ago

For compat reason we're returning from the API Tasks we could have some performance benefit (expecially for the IMessageBus IDataConsumer) if we move it to ValueTask.

Evangelink commented 1 month ago

Are you thinking of multi-tfm code or dropping netstandard 2.0?

MarcoRossignoli commented 1 month ago

Are you thinking of multi-tfm code or dropping netstandard 2.0?

We won't never drop netstandard2.0 so or we take a dep there with ValueTask from official package(https://www.nuget.org/packages/System.Threading.Tasks.Extensions/) or #ifdef.