diff options
hooked up sdague new sqlite asset database provider to the old asset system. So we can still use sqlite for assets while we wait for the rest of the new asset system to be wrote.
Needs more testing, so if it causes problems will have to swap back to db4o.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Types/UpdateQueue.cs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Types/UpdateQueue.cs b/OpenSim/Region/Environment/Types/UpdateQueue.cs index d7eb6ee..dab4258 100644 --- a/OpenSim/Region/Environment/Types/UpdateQueue.cs +++ b/OpenSim/Region/Environment/Types/UpdateQueue.cs | |||
@@ -12,10 +12,43 @@ namespace OpenSim.Region.Environment.Types | |||
12 | 12 | ||
13 | private List<LLUUID> m_ids; | 13 | private List<LLUUID> m_ids; |
14 | 14 | ||
15 | public int Count | ||
16 | { | ||
17 | get { return m_queue.Count; } | ||
18 | } | ||
19 | |||
15 | public UpdateQueue() | 20 | public UpdateQueue() |
16 | { | 21 | { |
17 | m_queue = new Queue<SceneObjectPart>(); | 22 | m_queue = new Queue<SceneObjectPart>(); |
18 | m_ids = new List<LLUUID>(); | 23 | m_ids = new List<LLUUID>(); |
19 | } | 24 | } |
25 | |||
26 | public void Enqueue(SceneObjectPart part) | ||
27 | { | ||
28 | lock (m_ids) | ||
29 | { | ||
30 | if (!m_ids.Contains(part.UUID)) | ||
31 | { | ||
32 | m_ids.Add(part.UUID); | ||
33 | m_queue.Enqueue(part); | ||
34 | } | ||
35 | } | ||
36 | } | ||
37 | |||
38 | public SceneObjectPart Dequeue() | ||
39 | { | ||
40 | SceneObjectPart part = null; | ||
41 | if (m_queue.Count > 0) | ||
42 | { | ||
43 | part = m_queue.Dequeue(); | ||
44 | lock (m_ids) | ||
45 | { | ||
46 | m_ids.Remove(part.UUID); | ||
47 | } | ||
48 | } | ||
49 | |||
50 | return part; | ||
51 | } | ||
52 | |||
20 | } | 53 | } |
21 | } | 54 | } |