Ejemplo n.º 1
0
        public void Release(IProtoBufConnection connection)
        {
            IProtoBufConnection removed;

            ReservedConnections.TryRemove(connection, out removed);
            AvailableConnections.Enqueue(connection);
        }
Ejemplo n.º 2
0
 public void Release(IProtoBufConnection connection)
 {
     ReservedLock.EnterWriteLock();
     AvailableLock.EnterWriteLock();
     ReservedConnections.Remove(connection);
     AvailableConnections.Enqueue(connection);
     AvailableLock.ExitWriteLock();
     ReservedLock.ExitWriteLock();
 }