Mostly debugging verbosity which I shall very shortly comment out.

Just want to try this out on windows quickly.
ThreadPoolClientBranch
Justin Clarke Casey 2008-02-09 00:14:34 +00:00
parent bb5b88d161
commit 2dc94870aa
4 changed files with 21 additions and 4 deletions

View File

@ -64,5 +64,10 @@ namespace OpenSim.Framework
return m_queue.Contains(item); return m_queue.Contains(item);
} }
} }
public int Count()
{
return m_queue.Count;
}
} }
} }

View File

@ -43,6 +43,9 @@ namespace OpenSim.Region.Environment.Modules
//and some small clean up //and some small clean up
public class TextureDownloadModule : IRegionModule public class TextureDownloadModule : IRegionModule
{ {
private static readonly log4net.ILog m_log
= log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
private Scene m_scene; private Scene m_scene;
private List<Scene> m_scenes = new List<Scene>(); private List<Scene> m_scenes = new List<Scene>();
@ -164,6 +167,8 @@ namespace OpenSim.Region.Environment.Modules
m_queueSenders.Enqueue(sender); m_queueSenders.Enqueue(sender);
} }
} }
m_log.Info(String.Format("[TEXTURE DOWNLOAD] Texture sender queue size: {0}", m_queueSenders.Count()));
} }
} }
@ -174,4 +179,4 @@ namespace OpenSim.Region.Environment.Modules
} }
} }
} }

View File

@ -36,7 +36,8 @@ namespace OpenSim.Region.Environment.Modules
{ {
public class TextureSender public class TextureSender
{ {
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog m_log
= log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
public int counter = 0; public int counter = 0;
private AssetBase m_asset; private AssetBase m_asset;

View File

@ -37,6 +37,9 @@ namespace OpenSim.Region.Environment.Modules
{ {
public class UserTextureDownloadService public class UserTextureDownloadService
{ {
private static readonly log4net.ILog m_log
= log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
private readonly Dictionary<LLUUID, TextureSender> m_textureSenders = new Dictionary<LLUUID, TextureSender>(); private readonly Dictionary<LLUUID, TextureSender> m_textureSenders = new Dictionary<LLUUID, TextureSender>();
private readonly BlockingQueue<TextureSender> m_sharedSendersQueue; private readonly BlockingQueue<TextureSender> m_sharedSendersQueue;
private readonly Scene m_scene; private readonly Scene m_scene;
@ -98,9 +101,12 @@ namespace OpenSim.Region.Environment.Modules
if (!textureSender.ImageLoaded) if (!textureSender.ImageLoaded)
{ {
textureSender.TextureReceived(asset); textureSender.TextureReceived(asset);
EnqueueTextureSender(textureSender); EnqueueTextureSender(textureSender);
} }
m_log.Info(String.Format("[TEXTURE SENDER] Removing texture sender with uuid {0}", textureID));
m_textureSenders.Remove(textureID);
m_log.Info(String.Format("[TEXTURE SENDER] Current texture senders in dictionary: {0}", m_textureSenders.Count));
} }
else else
{ {