internal void Push(NSocketSAEAItem item) { if (item == null) throw new ArgumentNullException("SocketAsyncEventArgsWithId对象为空"); if (busyPool.Keys.Contains(item.UID)) { lock (busyPool) { busyPool.Remove(item.UID); } } item.UID = "-1"; item.Disconnect(); lock (this.idlePool) { this.idlePool.Enqueue(item); } }
internal void Push(NSocketSAEAItem item) { if (item == null) throw new ArgumentNullException("SocketAsyncEventArgsWithId对象为空"); if (busyPool.Keys.Contains(item.UID)) { lock (busyPool) { busyPool.Remove(item.UID); } } item.UID = "-1"; item.Disconnect(); lock (this.idlePool) { this.idlePool.Enqueue(item); } }