/// <summary> /// Ctor /// </summary> /// <param name="param"></param> public LockWait(ref LockParam param) { this._param = param; while (Interlocked.CompareExchange(ref param.signal, 1, 0) == 1) { Thread.Sleep(param.sleepInterval); } }
/// <summary> /// 释放 /// </summary> public void Dispose() { OnDispose(); Clear(); pool = null; lockParam = null; onClearObject = null; onGetObject = null; onSetObject = null; onCreateObject = null; }
/// <summary> /// Ctor /// </summary> protected ObjectPool() { pool = new List <T>(); lockParam = new LockParam(); }
/// <summary> /// Ctor /// </summary> protected ObjectPool() { lockParam = new LockParam(); }