From 52f0c8d15d0d8a43a809d0f94f96dd115a6d3766 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Sun, 21 Sep 2008 17:49:52 +0000
Subject: * minor: tidy up of AssetCache, remove currently pointless storing of
thread reference
---
.../Framework/Communications/Cache/AssetCache.cs | 21 +++++++++------------
1 file changed, 9 insertions(+), 12 deletions(-)
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs
index 3e88eba..c6f41a6 100644
--- a/OpenSim/Framework/Communications/Cache/AssetCache.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs
@@ -68,7 +68,7 @@ namespace OpenSim.Framework.Communications.Cache
///
/// Assets requests which are waiting for asset server data. This includes texture requests
///
- private Dictionary RequestedAssets;
+ private Dictionary RequestedAssets;
///
/// Asset requests with data which are ready to be sent back to requesters. This includes textures.
@@ -80,10 +80,11 @@ namespace OpenSim.Framework.Communications.Cache
///
private Dictionary RequestLists;
+ ///
+ /// The 'server' from which assets can be requested and to which assets are persisted.
+ ///
private readonly IAssetServer m_assetServer;
- private readonly Thread m_assetCacheThread;
-
///
/// Report statistical data.
///
@@ -175,11 +176,11 @@ namespace OpenSim.Framework.Communications.Cache
m_assetServer = assetServer;
m_assetServer.SetReceiver(this);
- m_assetCacheThread = new Thread(new ThreadStart(RunAssetManager));
- m_assetCacheThread.Name = "AssetCacheThread";
- m_assetCacheThread.IsBackground = true;
- m_assetCacheThread.Start();
- ThreadTracker.Add(m_assetCacheThread);
+ Thread assetCacheThread = new Thread(new ThreadStart(RunAssetManager));
+ assetCacheThread.Name = "AssetCacheThread";
+ assetCacheThread.IsBackground = true;
+ assetCacheThread.Start();
+ ThreadTracker.Add(assetCacheThread);
}
///
@@ -252,7 +253,6 @@ namespace OpenSim.Framework.Communications.Cache
{
//m_log.DebugFormat("[ASSET CACHE]: Requesting {0} {1}", isTexture ? "texture" : "asset", assetId);
-
// Xantor 20080526:
// if a request is made for an asset which is not in the cache yet, but has already been requested by
// something else, queue up the callbacks on that requestor instead of swamping the assetserver
@@ -266,9 +266,7 @@ namespace OpenSim.Framework.Communications.Cache
}
else
{
-#if DEBUG
// m_log.DebugFormat("[ASSET CACHE]: Adding request for {0} {1}", isTexture ? "texture" : "asset", assetId);
-#endif
NewAssetRequest req = new NewAssetRequest(assetId, callback);
AssetRequestsList requestList;
@@ -389,7 +387,6 @@ namespace OpenSim.Framework.Communications.Cache
/// real solution here is a much better cache archicture, but
/// this is a stop gap measure until we have such a thing.
///
-
public void ExpireAsset(UUID uuid)
{
// uuid is unique, so no need to worry about it showing up
--
cgit v1.1