From a1e2fea7c1fc612da088914aab7a462c212bc97d Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Tue, 11 Sep 2007 08:25:32 +0000 Subject: move the locks closer to the data, sqlite for assets now works like a champ --- OpenSim/Framework/Communications/Cache/AssetCache.cs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'OpenSim/Framework/Communications/Cache') diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs index 8a16f03..2f4c006 100644 --- a/OpenSim/Framework/Communications/Cache/AssetCache.cs +++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs @@ -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); } } -- cgit v1.1