Esempio n. 1
0
        void EvictHandler(ActiveHandler handler)
        {
            if (!_handlers.TryRemove(handler.Index, out _))
            {
                throw new InvalidOperationException("Could not remove handler");
            }

            _evictedHandlers.Enqueue(new EvictedHandler(handler));
            ScheduleCleanup();
        }
Esempio n. 2
0
 public EvictedHandler(ActiveHandler handler)
 {
     _disposableHandler = handler.InnerHandler;
     _weakReference     = new WeakReference(handler);
 }