public AsyncTimerProcessorResult <TArg> RegisterAsync <TArg>(TimeSpan delay)
        {
            TimerProcessorCallBackRequest request = TimerProcessorCallBackRequest.Add <TArg>(RealTimeSource.GetUtcNow(), delay);

            if (Status == TimerProcessorStatus.Disposed)
            {
                return(request.TrySetDisposed().GetAsyncResult <TArg>());
            }
            if (Status == TimerProcessorStatus.Disposing)
            {
                return(request.TrySetCanceled().GetAsyncResult <TArg>());
            }

            using (Lock.Enter())
            {
                NullSafeSequencer.PointArg(SeqPointTypeUC.Notify, TimerProcessorSequencer.RegisterStatus, Status);
                NullSafeSequencer.PointArg(SeqPointTypeUC.Notify, TimerProcessorSequencer.RegisterActiveProcessing, ActiveProcessing);
                if (Status == TimerProcessorStatus.Disposed)
                {
                    return(request.TrySetDisposed().GetAsyncResult <TArg>());
                }
                if (Status == TimerProcessorStatus.Disposing)
                {
                    return(request.TrySetCanceled().GetAsyncResult <TArg>());
                }
                Requests.Enqueue(request);
                if (ActiveProcessing)
                {
                    return(request.GetAsyncResult <TArg>());
                }
            }

            if (Processing(processActions: false) == ProcessingResult.Processed)
            {
                return(request.GetAsyncResult <TArg>());
            }

            using (Lock.Enter())
            {
                NullSafeSequencer.PointArg(SeqPointTypeUC.Notify, TimerProcessorSequencer.RegisterEnd, Status);
                if (Status == TimerProcessorStatus.Disposed)
                {
                    return(request.TrySetDisposed().GetAsyncResult <TArg>());
                }
                TryUpdateTimer(activate: true);
                return(request.GetAsyncResult <TArg>());
            }
        }
        public AsyncTimerProcessorResult <TArg> UnRegisterAsync <TArg>(TaskCompletionSource <TArg> tcs)
        {
            if (tcs == null)
            {
                throw new ArgumentNullException(nameof(tcs));
            }
            TimerProcessorCallBackRequest request = TimerProcessorCallBackRequest.Remove(tcs);

            if (Status == TimerProcessorStatus.Disposed)
            {
                return(request.TrySetDisposed().GetAsyncResult <TArg>());
            }

            using (Lock.Enter())
            {
                if (Status == TimerProcessorStatus.Disposed)
                {
                    return(request.TrySetDisposed().GetAsyncResult <TArg>());
                }
                NullSafeSequencer.PointArg(SeqPointTypeUC.Notify, TimerProcessorSequencer.UnRegisterStatus, Status);
                NullSafeSequencer.PointArg(SeqPointTypeUC.Notify, TimerProcessorSequencer.UnRegisterActiveProcessing, ActiveProcessing);
                Requests.Enqueue(request);
                if (ActiveProcessing)
                {
                    return(request.GetAsyncResult <TArg>());
                }
            }

            if (Processing(processActions: false) == ProcessingResult.Processed)
            {
                return(request.GetAsyncResult <TArg>());
            }

            using (Lock.Enter())
            {
                NullSafeSequencer.PointArg(SeqPointTypeUC.Notify, TimerProcessorSequencer.UnRegisterEnd, Status);
                if (Status == TimerProcessorStatus.Disposed)
                {
                    return(request.TrySetDisposed().GetAsyncResult <TArg>());
                }
                TryUpdateTimer(activate: true);
                return(request.GetAsyncResult <TArg>());
            }
        }