private PooledStream GetFromPool(object owningObject) {
PooledStream res = null;
GlobalLog.Enter("ConnectionPool#" + ValidationHelper.HashString(this) + "::GetFromPool");
res = (PooledStream) m_StackNew.Pop();
if (null == res) {
res = (PooledStream) m_StackOld.Pop();
}
// Shouldn't be null, we could assert here.
GlobalLog.Assert(res != null, "GetFromPool called with nothing in the pool!");
if (null != res) {
res.PostPop(owningObject);
GlobalLog.Print("GetFromGeneralPool pooledStream#"+ValidationHelper.HashString(res));
}
GlobalLog.Leave("ConnectionPool#" + ValidationHelper.HashString(this) + "::GetFromPool",ValidationHelper.HashString(res));
return(res);
}