← All source files

V18 / 8d896b8a86e5

SemaphoreLease.cs

Lilith/Core/Extensions/SemaphoreLease.cs

Unchanged from the preceding version
CS
namespace Lilith.Core.Extensions;

internal sealed class SemaphoreLease(SemaphoreSlim gate) : IDisposable
{
    private SemaphoreSlim? _gate = gate;
    public void Dispose() => Interlocked.Exchange(ref _gate, null)?.Release();
}