aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.Caches/AssetCache.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/OpenSim.Caches/AssetCache.cs')
-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)