diff options
author | Mic Bowman | 2011-08-05 11:13:02 -0700 |
---|---|---|
committer | Mic Bowman | 2011-08-05 11:13:02 -0700 |
commit | c3f579046c4de7a5a65e71e4c02958425fd7998a (patch) | |
tree | b725d9eaa66d5eb7cf1f87ddbb4fa0f4284f71f5 /OpenSim/Framework/Util.cs | |
parent | BulletSim: Parameters settable from ini file. Linksets. Physical property val... (diff) | |
parent | remove the largely unused copy/pasted HandleAgentRequestSit() method (diff) | |
download | opensim-SC-c3f579046c4de7a5a65e71e4c02958425fd7998a.zip opensim-SC-c3f579046c4de7a5a65e71e4c02958425fd7998a.tar.gz opensim-SC-c3f579046c4de7a5a65e71e4c02958425fd7998a.tar.bz2 opensim-SC-c3f579046c4de7a5a65e71e4c02958425fd7998a.tar.xz |
Merge branch 'master' into bulletsim
Diffstat (limited to 'OpenSim/Framework/Util.cs')
-rw-r--r-- | OpenSim/Framework/Util.cs | 15 |
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: |