<PackageReference Include="Microsoft.Identity.Client" Version="4.84.1" />

Microsoft.Identity.Client.Utils.OptionalSemaphoreSlim

An object that either wraps a SemaphoreSlim for synchronization or ignores synchronization completely and just keeps track of Wait / Release operations.
namespace Microsoft.Identity.Client.Utils { internal class OptionalSemaphoreSlim { public int CurrentCount { get; } public string GetCurrentCountLogMessage(); public OptionalSemaphoreSlim(bool useRealSemaphore); public void Release(); public Task WaitAsync(CancellationToken cancellationToken); public void Wait(); } }