road-to-orleans
road-to-orleans copied to clipboard
Use valuetask instead of Task.FromResult
A trivial change to introduce ValueTask instead of Task.FromResult. In this case being completely synchronous, the code shouldn't allocate anything, instead of allocating one Task.
If we agree on the changes, I'll propagate them across the various solutions
Very nice, let's apply this 👍
Some reading material for those interested:
- https://blog.marcgravell.com/2019/08/prefer-valuetask-to-task-always-and.html
- https://devblogs.microsoft.com/dotnet/understanding-the-whys-whats-and-whens-of-valuetask