comparison Implab/DisposablePool.cs @ 119:2573b562e328 v2

Promises rewritten, added improved version of AsyncQueue
author cin
date Sun, 11 Jan 2015 19:13:02 +0300
parents 8beee0d11de6
children
comparison
equal deleted inserted replaced
118:e046a94eecb1 119:2573b562e328
5 using System.Diagnostics.CodeAnalysis; 5 using System.Diagnostics.CodeAnalysis;
6 6
7 namespace Implab { 7 namespace Implab {
8 public abstract class DisposablePool<T> : IDisposable { 8 public abstract class DisposablePool<T> : IDisposable {
9 readonly int m_size; 9 readonly int m_size;
10 readonly MTQueue<T> m_queue = new MTQueue<T>(); 10 readonly AsyncQueue<T> m_queue = new AsyncQueue<T>();
11 11
12 [SuppressMessage("Microsoft.Design", "CA1000:DoNotDeclareStaticMembersOnGenericTypes")] 12 [SuppressMessage("Microsoft.Design", "CA1000:DoNotDeclareStaticMembersOnGenericTypes")]
13 static readonly bool _isValueType = typeof(T).IsValueType; 13 static readonly bool _isValueType = typeof(T).IsValueType;
14 14
15 bool m_disposed; 15 bool m_disposed;