Make ValueTaskAwaiters readonly structs
authorStephen Toub <stoub@microsoft.com>
Tue, 30 Jan 2018 15:13:52 +0000 (10:13 -0500)
committerStephen Toub <stoub@microsoft.com>
Tue, 30 Jan 2018 15:13:52 +0000 (10:13 -0500)
commit1e961391acced7d2fc6fea91c97792a7a05427a0
tree0792c841a98ef747c9ec0cf33690a9b2f2f82242
parentf748d23a90d5563e7961a03863b40cb476c943f3
Make ValueTaskAwaiters readonly structs

The _value field wasn't previously readonly, because method calls were made on the ValueTask, resulting in a copy.  But now that ValueTask is a readonly struct, the field can be readonly, and these structs can then also be readonly.
src/mscorlib/shared/System/Runtime/CompilerServices/ConfiguredValueTaskAwaitable.cs
src/mscorlib/shared/System/Runtime/CompilerServices/ValueTaskAwaiter.cs