Merge branch 'master' of ssh://opensimulator.org/var/git/opensim

cpu-performance
Diva Canto 2013-07-16 17:15:08 -07:00
commit 0419852598
1 changed files with 19 additions and 1 deletions

View File

@ -89,6 +89,12 @@ namespace OpenSim.Framework
}
}
/// <summary>
/// Indicate whether this queue contains the given item.
/// </summary>
/// <remarks>
/// This method is not thread-safe. Do not rely on the result without consistent external locking.
/// </remarks>
public bool Contains(T item)
{
if (m_queue.Count < 1 && m_pqueue.Count < 1)
@ -102,11 +108,23 @@ namespace OpenSim.Framework
}
}
/// <summary>
/// Return a count of the number of requests on this queue.
/// </summary>
/// <remarks>
/// This method is not thread-safe. Do not rely on the result without consistent external locking.
/// </remarks>
public int Count()
{
return m_queue.Count+m_pqueue.Count;
return m_queue.Count + m_pqueue.Count;
}
/// <summary>
/// Return the array of items on this queue.
/// </summary>
/// <remarks>
/// This method is not thread-safe. Do not rely on the result without consistent external locking.
/// </remarks>
public T[] GetQueueArray()
{
if (m_queue.Count < 1 && m_pqueue.Count < 1)