internal void ReleaseProcessor(QueryProcessor processor)
 {
     if (processor.ReleaseRef())
     {
         lock (this.processorPool)
         {
             QueryProcessorPool target = this.processorPool.Target as QueryProcessorPool;
             if (target == null)
             {
                 target = new QueryProcessorPool();
                 this.processorPool.Target = target;
             }
             target.Push(processor);
         }
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Release the given processor and place it back in the context pool
        /// </summary>
        internal void ReleaseProcessor(QueryProcessor processor)
        {
            if (!processor.ReleaseRef())
            {
                return;
            }

            lock (this.processorPool)
            {
                QueryProcessorPool pool = this.processorPool.Target as QueryProcessorPool;
                if (null == pool)
                {
                    pool = new QueryProcessorPool();
                    this.processorPool.Target = pool;
                }
                pool.Push(processor);
            }
        }