buvinghausen / TaskTupleAwaiter

Async helper library to allow leveraging the new ValueTuple data types in C# 7.0
MIT License
70 stars 10 forks source link

Support ValueTask #26

Open wertzui opened 11 months ago

wertzui commented 11 months ago

At the moment, only Tasks are supported by the library. However there is also ValueTask which would be a nice addition on their own and also together in Tuples with normal Taskss.

jnm2 commented 11 months ago

There's no way to generalize between Task and ValueTask without an exponential explosion of code. I would suggest doing the same as you would already have to do with ValueTasks when you want to use them with Task.WhenAll: use .AsTask() on each ValueTask.