diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/BlockingQueue.cs | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/OpenSim/Framework/BlockingQueue.cs b/OpenSim/Framework/BlockingQueue.cs index cc016b0..aef1192 100644 --- a/OpenSim/Framework/BlockingQueue.cs +++ b/OpenSim/Framework/BlockingQueue.cs | |||
@@ -89,6 +89,12 @@ namespace OpenSim.Framework | |||
89 | } | 89 | } |
90 | } | 90 | } |
91 | 91 | ||
92 | /// <summary> | ||
93 | /// Indicate whether this queue contains the given item. | ||
94 | /// </summary> | ||
95 | /// <remarks> | ||
96 | /// This method is not thread-safe. Do not rely on the result without consistent external locking. | ||
97 | /// </remarks> | ||
92 | public bool Contains(T item) | 98 | public bool Contains(T item) |
93 | { | 99 | { |
94 | if (m_queue.Count < 1 && m_pqueue.Count < 1) | 100 | if (m_queue.Count < 1 && m_pqueue.Count < 1) |
@@ -102,11 +108,23 @@ namespace OpenSim.Framework | |||
102 | } | 108 | } |
103 | } | 109 | } |
104 | 110 | ||
111 | /// <summary> | ||
112 | /// Return a count of the number of requests on this queue. | ||
113 | /// </summary> | ||
114 | /// <remarks> | ||
115 | /// This method is not thread-safe. Do not rely on the result without consistent external locking. | ||
116 | /// </remarks> | ||
105 | public int Count() | 117 | public int Count() |
106 | { | 118 | { |
107 | return m_queue.Count+m_pqueue.Count; | 119 | return m_queue.Count + m_pqueue.Count; |
108 | } | 120 | } |
109 | 121 | ||
122 | /// <summary> | ||
123 | /// Return the array of items on this queue. | ||
124 | /// </summary> | ||
125 | /// <remarks> | ||
126 | /// This method is not thread-safe. Do not rely on the result without consistent external locking. | ||
127 | /// </remarks> | ||
110 | public T[] GetQueueArray() | 128 | public T[] GetQueueArray() |
111 | { | 129 | { |
112 | if (m_queue.Count < 1 && m_pqueue.Count < 1) | 130 | if (m_queue.Count < 1 && m_pqueue.Count < 1) |