On .NET  - Channel 9

Understanding how to use Task and ValueTask


Listen Later

In this episode, Stephen Toub chats with Rich about ValueTask and how it might help reduce allocations and memory usage for your asynchronous .NET code. [00:34] - What is ValueTask and why do we need it?[05:22] - What is a good scenario for ValueTask?[10:00] - What is IValueTask?[12:14] - Why was the non-generic ValueTask introduced?[13:54] - Does ValueTask offer cancellation?[14:42] - What can you do with Task vs ValueTask?[16:28] - What's the uptake with ValueTask usage?[18:28] - How does IAsyncEnumerable task advantage of ValueTask?[21:11] - What other performance work is happening around allocations? Useful Links Understanding the Whys, what's, and when's of ValueTaskValueTask reference docsNuGet package for ValueTask
...more
View all episodesView all episodes
Download on the App Store

On .NET  - Channel 9By Microsoft