move the locks closer to the data, sqlite for assets now works like a champ

This commit is contained in:
Sean Dague
2007-09-11 08:25:32 +00:00
parent b3777729b4
commit a1e2fea7c1
2 changed files with 37 additions and 40 deletions

View File

@@ -200,10 +200,7 @@ namespace OpenSim.Framework.Communications.Caches
//Console.WriteLine("new texture to send");
TextureSender sender = new TextureSender(req);
//sender.OnComplete += this.TextureSent;
lock (this.SendingTextures)
{
this.SendingTextures.Add(req.ImageInfo.FullID, sender);
}
this.SendingTextures.Add(req.ImageInfo.FullID, sender);
this.QueueTextures.Enqueue(sender);
}
@@ -263,11 +260,8 @@ namespace OpenSim.Framework.Communications.Caches
{
if (this.SendingTextures.ContainsKey(sender.request.ImageInfo.FullID))
{
lock (this.SendingTextures)
{
this.SendingTextures.Remove(sender.request.ImageInfo.FullID);
// this.AvatarRecievedTextures[sender.request.RequestUser.AgentId].Add(sender.request.ImageInfo.FullID);
}
this.SendingTextures.Remove(sender.request.ImageInfo.FullID);
// this.AvatarRecievedTextures[sender.request.RequestUser.AgentId].Add(sender.request.ImageInfo.FullID);
}
}