aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Types
diff options
context:
space:
mode:
authorMW2007-09-10 06:45:54 +0000
committerMW2007-09-10 06:45:54 +0000
commit15423539f98d47201a819e35f80b0c30ee459556 (patch)
tree3eb7831bfaaf5e0309c49f966d19869a9fe72e2b /OpenSim/Region/Environment/Types
parent* Fixed: Accessing xmlrpc with invalid xml data would crash the sim. (diff)
downloadopensim-SC_OLD-15423539f98d47201a819e35f80b0c30ee459556.zip
opensim-SC_OLD-15423539f98d47201a819e35f80b0c30ee459556.tar.gz
opensim-SC_OLD-15423539f98d47201a819e35f80b0c30ee459556.tar.bz2
opensim-SC_OLD-15423539f98d47201a819e35f80b0c30ee459556.tar.xz
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 'OpenSim/Region/Environment/Types')
-rw-r--r--OpenSim/Region/Environment/Types/UpdateQueue.cs33
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}