public void ReturnOutputBuffer(IBufferObjectDataOutput output) { if (output == null) { return; } output.Clear(); OfferOrClose(outputQueue, output); }
internal void Push(IBufferObjectDataOutput output) { if (output == null) { return; } output.Clear(); ConcurrentQueue <IBufferObjectDataOutput> outputQueue; _map.TryGetValue(Thread.CurrentThread, out outputQueue); if (outputQueue == null) { IOUtil.CloseResource(output); return; } try { outputQueue.Enqueue(output); } catch (Exception) { IOUtil.CloseResource(output); } }