minor: Add warning method doc about possibly inconsistent results returned from BlockingQueue.Contains(), Count() and GetQueueArray()
parent
50b8ab60f2
commit
cbc3576ee2
|
@ -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)
|
public bool Contains(T item)
|
||||||
{
|
{
|
||||||
if (m_queue.Count < 1 && m_pqueue.Count < 1)
|
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()
|
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()
|
public T[] GetQueueArray()
|
||||||
{
|
{
|
||||||
if (m_queue.Count < 1 && m_pqueue.Count < 1)
|
if (m_queue.Count < 1 && m_pqueue.Count < 1)
|
||||||
|
|
Loading…
Reference in New Issue