From bc143cb52db18c86d132149c7f5bf7ea267920eb Mon Sep 17 00:00:00 2001 From: Christopher Date: Wed, 8 Jul 2020 02:12:41 +0200 Subject: [PATCH] make write and delete in new thread --- src/DataValue.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/DataValue.cs b/src/DataValue.cs index 50a82bb..205cef0 100644 --- a/src/DataValue.cs +++ b/src/DataValue.cs @@ -12,6 +12,7 @@ using System.Linq; using System.Reflection; using System.Security.Cryptography; using System.Text; +using System.Threading; using System.Timers; [assembly: Addin("DataValueModule", "0.1")] @@ -169,7 +170,8 @@ namespace OpenSim.Modules.DataValue checkRateLimit(); m_cache.Add(new StorageElement(_host.GroupID.ToString(), key, value, m_storage)); - m_storage.save(_host.GroupID.ToString(), key, value); + + (new Thread(delegate () { try { m_storage.save(_host.GroupID.ToString(), key, value); } catch (Exception _innterError) { m_log.Error(_innterError.Message); } })).Start(); return; } catch (Exception _error) @@ -195,7 +197,7 @@ namespace OpenSim.Modules.DataValue if (_element != null) m_cache.Remove(_element); - m_storage.remove(_host.GroupID.ToString(), key); + (new Thread(delegate () { try { m_storage.remove(_host.GroupID.ToString(), key); } catch(Exception _innterError) { m_log.Error(_innterError.Message); } })).Start(); } catch (Exception _error) {