public Trigger CreateTrigger() {
            Interlocked.Increment(ref _outstandingTriggers);

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

            SingleEntryGate triggerFiredGate = new SingleEntryGate();

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