V1 / 8f6c47b125e8
LoggerSubscription.cs
Lilith/Core/Logging/LoggerSubscription.cs
Changed in this versionCS
namespace Lilith.Core.Logging;
internal sealed class LoggerSubscription(Logger logger, Action<LogEntry> handler) : IDisposable
{
private int _disposed;
public void Dispose()
{
if (Interlocked.Exchange(ref _disposed, 1) == 1)
{
return;
}
logger.Unsubscribe(handler);
}
}