aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Util.cs15
1 files changed, 10 insertions, 5 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index fce8999..984a7a8 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -1499,25 +1499,30 @@ namespace OpenSim.Framework
1499 1499
1500 public static void FireAndForget(System.Threading.WaitCallback callback, object obj) 1500 public static void FireAndForget(System.Threading.WaitCallback callback, object obj)
1501 { 1501 {
1502 // When OpenSim interacts with a database or sends data over the wire, it must send this in en_US culture
1503 // so that we don't encounter problems where, for instance, data is saved with a culture that uses commas
1504 // for decimals places but is read by a culture that treats commas as number seperators.
1505 WaitCallback realCallback = delegate(object o) { Culture.SetCurrentCulture(); callback(o); };
1506
1502 switch (FireAndForgetMethod) 1507 switch (FireAndForgetMethod)
1503 { 1508 {
1504 case FireAndForgetMethod.UnsafeQueueUserWorkItem: 1509 case FireAndForgetMethod.UnsafeQueueUserWorkItem:
1505 ThreadPool.UnsafeQueueUserWorkItem(callback, obj); 1510 ThreadPool.UnsafeQueueUserWorkItem(realCallback, obj);
1506 break; 1511 break;
1507 case FireAndForgetMethod.QueueUserWorkItem: 1512 case FireAndForgetMethod.QueueUserWorkItem:
1508 ThreadPool.QueueUserWorkItem(callback, obj); 1513 ThreadPool.QueueUserWorkItem(realCallback, obj);
1509 break; 1514 break;
1510 case FireAndForgetMethod.BeginInvoke: 1515 case FireAndForgetMethod.BeginInvoke:
1511 FireAndForgetWrapper wrapper = FireAndForgetWrapper.Instance; 1516 FireAndForgetWrapper wrapper = FireAndForgetWrapper.Instance;
1512 wrapper.FireAndForget(callback, obj); 1517 wrapper.FireAndForget(realCallback, obj);
1513 break; 1518 break;
1514 case FireAndForgetMethod.SmartThreadPool: 1519 case FireAndForgetMethod.SmartThreadPool:
1515 if (m_ThreadPool == null) 1520 if (m_ThreadPool == null)
1516 m_ThreadPool = new SmartThreadPool(2000, 15, 2); 1521 m_ThreadPool = new SmartThreadPool(2000, 15, 2);
1517 m_ThreadPool.QueueWorkItem(SmartThreadPoolCallback, new object[] { callback, obj }); 1522 m_ThreadPool.QueueWorkItem(SmartThreadPoolCallback, new object[] { realCallback, obj });
1518 break; 1523 break;
1519 case FireAndForgetMethod.Thread: 1524 case FireAndForgetMethod.Thread:
1520 Thread thread = new Thread(delegate(object o) { callback(o); }); 1525 Thread thread = new Thread(delegate(object o) { realCallback(o); });
1521 thread.Start(obj); 1526 thread.Start(obj);
1522 break; 1527 break;
1523 default: 1528 default: