Skip to content

Commit

Permalink
Switch back to Interlocked.Exchange in ReleaseLock.
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeBlanch committed Feb 20, 2024
1 parent 19b1234 commit 6417d23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/OpenTelemetry/Metrics/MetricPointOptionalComponents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void AcquireLock()
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void ReleaseLock()
{
Volatile.Write(ref this.isCriticalSectionOccupied, 0);
Interlocked.Exchange(ref this.isCriticalSectionOccupied, 0);
}

[MethodImpl(MethodImplOptions.NoInlining)]
Expand Down

0 comments on commit 6417d23

Please sign in to comment.