Пример #1
0
        public Trigger CreateTrigger() {
            Interlocked.Increment(ref _outstandingTriggers);

            SingleEntryGate triggerFiredGate = new SingleEntryGate();
            return new Trigger(() => {
                if (triggerFiredGate.TryEnter()) {
                    HandleTriggerFired();
                }
            });
        }
Пример #2
0
        public Trigger CreateTrigger()
        {
            Interlocked.Increment(ref _outstandingTriggers);

            SingleEntryGate triggerFiredGate = new SingleEntryGate();

            return(new Trigger(() => {
                if (triggerFiredGate.TryEnter())
                {
                    HandleTriggerFired();
                }
            }));
        }