Add ImmutableInterlocked.Update overloads for ImmutableArray (dotnet/corefx#41600)
authorStephen Toub <stoub@microsoft.com>
Tue, 8 Oct 2019 18:46:26 +0000 (14:46 -0400)
committerGitHub <noreply@github.com>
Tue, 8 Oct 2019 18:46:26 +0000 (14:46 -0400)
commitb0d3fb7ebab39bd7f3a6a60cac3f0a6eb7dbb550
treebf7d035acb1b6e34cc67c9dd235e3d2aa2947b55
parentd876c92bb4b38de00a392fc5b578b6902d87db01
Add ImmutableInterlocked.Update overloads for ImmutableArray (dotnet/corefx#41600)

* Add ImmutableInterlocked.Update overloads for ImmutableArray

The implementations and tests just copy the exist Update overloads, tweaked to work with ImmutableArray.

* Address PR feedback

Commit migrated from https://github.com/dotnet/corefx/commit/9de37814fe28f497c8679b52772f2e5dd7f73306
src/libraries/System.Collections.Immutable/ref/System.Collections.Immutable.cs
src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableInterlocked.cs
src/libraries/System.Collections.Immutable/tests/ImmutableInterlockedTests.cs