Files
mtusi2026lab5/src/Messenger.Api/Infrastructure/ReadinessState.cs
T

9 lines
238 B
C#

namespace Messenger.Api.Infrastructure;
public sealed class ReadinessState
{
private int _stopping;
public bool IsStopping => Volatile.Read(ref _stopping) != 0;
public void Stop() => Interlocked.Exchange(ref _stopping, 1);
}