diff options
author | Sean Dague | 2007-09-17 12:52:03 +0000 |
---|---|---|
committer | Sean Dague | 2007-09-17 12:52:03 +0000 |
commit | b8d9737a47696952bedec33dface8f18df47341f (patch) | |
tree | 9279f45510f8a9285ac5b9c9165ab6c741009eac /OpenSim/Region/Environment/Types/UpdateQueue.cs | |
parent | I think this is the last bits for a consistant pristine (diff) | |
download | opensim-SC_OLD-b8d9737a47696952bedec33dface8f18df47341f.zip opensim-SC_OLD-b8d9737a47696952bedec33dface8f18df47341f.tar.gz opensim-SC_OLD-b8d9737a47696952bedec33dface8f18df47341f.tar.bz2 opensim-SC_OLD-b8d9737a47696952bedec33dface8f18df47341f.tar.xz |
fixing me some line endings
Diffstat (limited to 'OpenSim/Region/Environment/Types/UpdateQueue.cs')
-rw-r--r-- | OpenSim/Region/Environment/Types/UpdateQueue.cs | 108 |
1 files changed, 54 insertions, 54 deletions
diff --git a/OpenSim/Region/Environment/Types/UpdateQueue.cs b/OpenSim/Region/Environment/Types/UpdateQueue.cs index dab4258..3b7c182 100644 --- a/OpenSim/Region/Environment/Types/UpdateQueue.cs +++ b/OpenSim/Region/Environment/Types/UpdateQueue.cs | |||
@@ -1,54 +1,54 @@ | |||
1 | using System; | 1 | using System; |
2 | using System.Collections.Generic; | 2 | using System.Collections.Generic; |
3 | using System.Text; | 3 | using System.Text; |
4 | using OpenSim.Region.Environment.Scenes; | 4 | using OpenSim.Region.Environment.Scenes; |
5 | using libsecondlife; | 5 | using libsecondlife; |
6 | 6 | ||
7 | namespace OpenSim.Region.Environment.Types | 7 | namespace OpenSim.Region.Environment.Types |
8 | { | 8 | { |
9 | public class UpdateQueue | 9 | public class UpdateQueue |
10 | { | 10 | { |
11 | private Queue<SceneObjectPart> m_queue; | 11 | private Queue<SceneObjectPart> m_queue; |
12 | 12 | ||
13 | private List<LLUUID> m_ids; | 13 | private List<LLUUID> m_ids; |
14 | 14 | ||
15 | public int Count | 15 | public int Count |
16 | { | 16 | { |
17 | get { return m_queue.Count; } | 17 | get { return m_queue.Count; } |
18 | } | 18 | } |
19 | 19 | ||
20 | public UpdateQueue() | 20 | public UpdateQueue() |
21 | { | 21 | { |
22 | m_queue = new Queue<SceneObjectPart>(); | 22 | m_queue = new Queue<SceneObjectPart>(); |
23 | m_ids = new List<LLUUID>(); | 23 | m_ids = new List<LLUUID>(); |
24 | } | 24 | } |
25 | 25 | ||
26 | public void Enqueue(SceneObjectPart part) | 26 | public void Enqueue(SceneObjectPart part) |
27 | { | 27 | { |
28 | lock (m_ids) | 28 | lock (m_ids) |
29 | { | 29 | { |
30 | if (!m_ids.Contains(part.UUID)) | 30 | if (!m_ids.Contains(part.UUID)) |
31 | { | 31 | { |
32 | m_ids.Add(part.UUID); | 32 | m_ids.Add(part.UUID); |
33 | m_queue.Enqueue(part); | 33 | m_queue.Enqueue(part); |
34 | } | 34 | } |
35 | } | 35 | } |
36 | } | 36 | } |
37 | 37 | ||
38 | public SceneObjectPart Dequeue() | 38 | public SceneObjectPart Dequeue() |
39 | { | 39 | { |
40 | SceneObjectPart part = null; | 40 | SceneObjectPart part = null; |
41 | if (m_queue.Count > 0) | 41 | if (m_queue.Count > 0) |
42 | { | 42 | { |
43 | part = m_queue.Dequeue(); | 43 | part = m_queue.Dequeue(); |
44 | lock (m_ids) | 44 | lock (m_ids) |
45 | { | 45 | { |
46 | m_ids.Remove(part.UUID); | 46 | m_ids.Remove(part.UUID); |
47 | } | 47 | } |
48 | } | 48 | } |
49 | 49 | ||
50 | return part; | 50 | return part; |
51 | } | 51 | } |
52 | 52 | ||
53 | } | 53 | } |
54 | } | 54 | } |