aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Cache/AssetCache.cs
diff options
context:
space:
mode:
authorJeff Ames2008-05-16 01:22:11 +0000
committerJeff Ames2008-05-16 01:22:11 +0000
commit65c5efe43b68700bad94076d4cd421160203c5de (patch)
tree589b56649ed02f4942671fd6e51c6dc43f682e0d /OpenSim/Framework/Communications/Cache/AssetCache.cs
parentThank you very much, mjm for : (diff)
downloadopensim-SC-65c5efe43b68700bad94076d4cd421160203c5de.zip
opensim-SC-65c5efe43b68700bad94076d4cd421160203c5de.tar.gz
opensim-SC-65c5efe43b68700bad94076d4cd421160203c5de.tar.bz2
opensim-SC-65c5efe43b68700bad94076d4cd421160203c5de.tar.xz
Formatting cleanup.
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/AssetCache.cs')
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetCache.cs22
1 files changed, 11 insertions, 11 deletions
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs
index 1414260..0669ce9 100644
--- a/OpenSim/Framework/Communications/Cache/AssetCache.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs
@@ -40,12 +40,12 @@ namespace OpenSim.Framework.Communications.Cache
40 40
41 /// <summary> 41 /// <summary>
42 /// Manages local cache of assets and their sending to viewers. 42 /// Manages local cache of assets and their sending to viewers.
43 /// 43 ///
44 /// This class actually encapsulates two largely separate mechanisms. One mechanism fetches assets either 44 /// This class actually encapsulates two largely separate mechanisms. One mechanism fetches assets either
45 /// synchronously or async and passes the data back to the requester. The second mechanism fetches assets and 45 /// synchronously or async and passes the data back to the requester. The second mechanism fetches assets and
46 /// sends packetised data directly back to the client. The only point where they meet is AssetReceived() and 46 /// sends packetised data directly back to the client. The only point where they meet is AssetReceived() and
47 /// AssetNotFound(), which means they do share the same asset and texture caches. 47 /// AssetNotFound(), which means they do share the same asset and texture caches.
48 /// 48 ///
49 /// TODO Assets in this cache are effectively immortal (they are never disposed off through old age). 49 /// TODO Assets in this cache are effectively immortal (they are never disposed off through old age).
50 /// This is not a huge problem at the moment since other memory use usually dwarfs that used by assets 50 /// This is not a huge problem at the moment since other memory use usually dwarfs that used by assets
51 /// but it's something to bear in mind. 51 /// but it's something to bear in mind.
@@ -281,8 +281,8 @@ namespace OpenSim.Framework.Communications.Cache
281 281
282 /// <summary> 282 /// <summary>
283 /// Synchronously retreive an asset. If the asset isn't in the cache, a request will be made to the persistent store to 283 /// Synchronously retreive an asset. If the asset isn't in the cache, a request will be made to the persistent store to
284 /// load it into the cache. 284 /// load it into the cache.
285 /// 285 ///
286 /// XXX We'll keep polling the cache until we get the asset or we exceed 286 /// XXX We'll keep polling the cache until we get the asset or we exceed
287 /// the allowed number of polls. This isn't a very good way of doing things since a single thread 287 /// the allowed number of polls. This isn't a very good way of doing things since a single thread
288 /// is processing inbound packets, so if the asset server is slow, we could block this for up to 288 /// is processing inbound packets, so if the asset server is slow, we could block this for up to
@@ -431,11 +431,11 @@ namespace OpenSim.Framework.Communications.Cache
431 //making a copy of the list is not ideal 431 //making a copy of the list is not ideal
432 //but the old method of locking around this whole block of code was causing a multi-thread lock 432 //but the old method of locking around this whole block of code was causing a multi-thread lock
433 //between this and the TextureDownloadModule 433 //between this and the TextureDownloadModule
434 //while the localAsset thread running this and trying to send a texture to the callback in the 434 //while the localAsset thread running this and trying to send a texture to the callback in the
435 //texturedownloadmodule , and hitting a lock in there. While the texturedownload thread (which was holding 435 //texturedownloadmodule , and hitting a lock in there. While the texturedownload thread (which was holding
436 // the lock in the texturedownload module) was trying to 436 // the lock in the texturedownload module) was trying to
437 //request a new asset and hitting a lock in here on the RequestLists. 437 //request a new asset and hitting a lock in here on the RequestLists.
438 438
439 List<NewAssetRequest> theseRequests = new List<NewAssetRequest>(reqList.Requests); 439 List<NewAssetRequest> theseRequests = new List<NewAssetRequest>(reqList.Requests);
440 reqList.Requests.Clear(); 440 reqList.Requests.Clear();
441 441
@@ -460,7 +460,7 @@ namespace OpenSim.Framework.Communications.Cache
460 { 460 {
461 // m_log.WarnFormat("[ASSET CACHE]: AssetNotFound for {0}", assetID); 461 // m_log.WarnFormat("[ASSET CACHE]: AssetNotFound for {0}", assetID);
462 462
463 // Notify requesters for this asset 463 // Notify requesters for this asset
464 AssetRequestsList reqList = null; 464 AssetRequestsList reqList = null;
465 lock (RequestLists) 465 lock (RequestLists)
466 { 466 {
@@ -552,7 +552,7 @@ namespace OpenSim.Framework.Communications.Cache
552 } 552 }
553 return; 553 return;
554 } 554 }
555 //it is in our cache 555 //it is in our cache
556 AssetInfo asset = Assets[requestID]; 556 AssetInfo asset = Assets[requestID];
557 557
558 // add to the AssetRequests list 558 // add to the AssetRequests list
@@ -679,14 +679,14 @@ namespace OpenSim.Framework.Communications.Cache
679 public byte AssetRequestSource = 2; 679 public byte AssetRequestSource = 2;
680 public byte[] Params = null; 680 public byte[] Params = null;
681 //public bool AssetInCache; 681 //public bool AssetInCache;
682 //public int TimeRequested; 682 //public int TimeRequested;
683 public int DiscardLevel = -1; 683 public int DiscardLevel = -1;
684 684
685 public AssetRequest() 685 public AssetRequest()
686 { 686 {
687 } 687 }
688 } 688 }
689 689
690 public class AssetInfo : AssetBase 690 public class AssetInfo : AssetBase
691 { 691 {
692 public AssetInfo() 692 public AssetInfo()