diff options
author | Diva Canto | 2013-07-16 17:15:08 -0700 |
---|---|---|
committer | Diva Canto | 2013-07-16 17:15:08 -0700 |
commit | 041985259888a908785702c2206aca0578211447 (patch) | |
tree | 84aa9a4fca78adc3714db87c5e43b7f23f6d5184 /OpenSim | |
parent | Added IServiceThrottleModule.cs (diff) | |
parent | minor: Add warning method doc about possibly inconsistent results returned fr... (diff) | |
download | opensim-SC_OLD-041985259888a908785702c2206aca0578211447.zip opensim-SC_OLD-041985259888a908785702c2206aca0578211447.tar.gz opensim-SC_OLD-041985259888a908785702c2206aca0578211447.tar.bz2 opensim-SC_OLD-041985259888a908785702c2206aca0578211447.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim')
-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) |