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); }