aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorJustin Clarke Casey2007-12-22 16:45:44 +0000
committerJustin Clarke Casey2007-12-22 16:45:44 +0000
commited0f8bd5728d0fbe992cc4a1d164983edda654e8 (patch)
tree071707a559b2600101cbfe241e289f75196d555a /OpenSim/Framework
parentPut in some race revealing warning messages triggered when a user rezzes a sc... (diff)
downloadopensim-SC-ed0f8bd5728d0fbe992cc4a1d164983edda654e8.zip
opensim-SC-ed0f8bd5728d0fbe992cc4a1d164983edda654e8.tar.gz
opensim-SC-ed0f8bd5728d0fbe992cc4a1d164983edda654e8.tar.bz2
opensim-SC-ed0f8bd5728d0fbe992cc4a1d164983edda654e8.tar.xz
minor refactor
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/BlockingQueue.cs2
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetCache.cs11
2 files changed, 9 insertions, 4 deletions
diff --git a/OpenSim/Framework/BlockingQueue.cs b/OpenSim/Framework/BlockingQueue.cs
index dbd116b..a3cae63 100644
--- a/OpenSim/Framework/BlockingQueue.cs
+++ b/OpenSim/Framework/BlockingQueue.cs
@@ -34,7 +34,7 @@ namespace OpenSim.Framework
34 { 34 {
35 private Queue<T> _queue = new Queue<T>(); 35 private Queue<T> _queue = new Queue<T>();
36 private object _queueSync = new object(); 36 private object _queueSync = new object();
37 37
38 public void Enqueue(T value) 38 public void Enqueue(T value)
39 { 39 {
40 lock (_queueSync) 40 lock (_queueSync)
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs
index 99356c2..d1ff9c9 100644
--- a/OpenSim/Framework/Communications/Cache/AssetCache.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs
@@ -98,7 +98,12 @@ namespace OpenSim.Framework.Communications.Cache
98 } 98 }
99 } 99 }
100 100
101 public AssetBase GetAsset(LLUUID assetID) 101 /// <summary>
102 /// Only get an asset if we already have it in the cache.
103 /// </summary>
104 /// <param name="assetID"></param></param>
105 /// <returns></returns>
106 private AssetBase GetCachedAsset(LLUUID assetID)
102 { 107 {
103 AssetBase asset = null; 108 AssetBase asset = null;
104 if (Textures.ContainsKey(assetID)) 109 if (Textures.ContainsKey(assetID))
@@ -153,7 +158,7 @@ namespace OpenSim.Framework.Communications.Cache
153 158
154 public AssetBase GetAsset(LLUUID assetID, bool isTexture) 159 public AssetBase GetAsset(LLUUID assetID, bool isTexture)
155 { 160 {
156 AssetBase asset = GetAsset(assetID); 161 AssetBase asset = GetCachedAsset(assetID);
157 if (asset == null) 162 if (asset == null)
158 { 163 {
159 m_assetServer.RequestAsset(assetID, isTexture); 164 m_assetServer.RequestAsset(assetID, isTexture);
@@ -223,7 +228,7 @@ namespace OpenSim.Framework.Communications.Cache
223 228
224 public AssetBase CopyAsset(LLUUID assetID) 229 public AssetBase CopyAsset(LLUUID assetID)
225 { 230 {
226 AssetBase asset = GetAsset(assetID); 231 AssetBase asset = GetCachedAsset(assetID);
227 if (asset == null) 232 if (asset == null)
228 return null; 233 return null;
229 234