aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.Caches
diff options
context:
space:
mode:
authorMW2007-06-24 16:19:53 +0000
committerMW2007-06-24 16:19:53 +0000
commit1b8b75d80ae5d61fcbac60602cf9af6cef2c4003 (patch)
tree78fde772e1b93d75c8c72ff57905e8bde0086a0e /OpenSim/OpenSim.Caches
parentDisabled the CheckSum Server as it seems that isn't used by viewer 1.18. (diff)
downloadopensim-SC_OLD-1b8b75d80ae5d61fcbac60602cf9af6cef2c4003.zip
opensim-SC_OLD-1b8b75d80ae5d61fcbac60602cf9af6cef2c4003.tar.gz
opensim-SC_OLD-1b8b75d80ae5d61fcbac60602cf9af6cef2c4003.tar.bz2
opensim-SC_OLD-1b8b75d80ae5d61fcbac60602cf9af6cef2c4003.tar.xz
A bit more work on the AssetCache.
Diffstat (limited to 'OpenSim/OpenSim.Caches')
-rw-r--r--OpenSim/OpenSim.Caches/AssetCache.cs12
1 files changed, 9 insertions, 3 deletions
diff --git a/OpenSim/OpenSim.Caches/AssetCache.cs b/OpenSim/OpenSim.Caches/AssetCache.cs
index 44d22a9..f310752 100644
--- a/OpenSim/OpenSim.Caches/AssetCache.cs
+++ b/OpenSim/OpenSim.Caches/AssetCache.cs
@@ -571,17 +571,23 @@ namespace OpenSim.Caches
571 { 571 {
572 public AssetRequest request; 572 public AssetRequest request;
573 public event DownloadComplete OnComplete; 573 public event DownloadComplete OnComplete;
574 574 Thread m_thread;
575 public TextureSender(AssetRequest req) 575 public TextureSender(AssetRequest req)
576 { 576 {
577 request = req; 577 request = req;
578 //Console.WriteLine("creating worker thread for texture " + req.ImageInfo.FullID.ToStringHyphenated()); 578 //Console.WriteLine("creating worker thread for texture " + req.ImageInfo.FullID.ToStringHyphenated());
579 //Console.WriteLine("texture data length is " + req.ImageInfo.Data.Length); 579 //Console.WriteLine("texture data length is " + req.ImageInfo.Data.Length);
580 // Console.WriteLine("in " + req.NumPackets + " packets"); 580 // Console.WriteLine("in " + req.NumPackets + " packets");
581 ThreadPool.QueueUserWorkItem(new WaitCallback(SendTexture), new object()); 581 //ThreadPool.QueueUserWorkItem(new WaitCallback(SendTexture), new object());
582
583 //need some sort of custom threadpool here, as using the .net one, overloads it and stops the handling of incoming packets etc
584 //but don't really want to create a thread for every texture download
585 m_thread = new Thread(new ThreadStart(SendTexture));
586 m_thread.IsBackground = true;
587 m_thread.Start();
582 } 588 }
583 589
584 public void SendTexture(Object obj) 590 public void SendTexture()
585 { 591 {
586 //Console.WriteLine("starting to send sending texture " + request.ImageInfo.FullID.ToStringHyphenated()); 592 //Console.WriteLine("starting to send sending texture " + request.ImageInfo.FullID.ToStringHyphenated());
587 while (request.PacketCounter != request.NumPackets) 593 while (request.PacketCounter != request.NumPackets)