If a FireAndForget thread terminates with an exception, then catch and log rather than letting it terminate the simulator.
Exceptions don't appear to do this with the SmartThreadPool but they do with UnsafeQueueUserWorkItem (and maybe others)remove-scene-viewer
parent
e69f246b86
commit
3aa86d22d1
|
@ -1508,7 +1508,21 @@ namespace OpenSim.Framework
|
||||||
// When OpenSim interacts with a database or sends data over the wire, it must send this in en_US culture
|
// When OpenSim interacts with a database or sends data over the wire, it must send this in en_US culture
|
||||||
// so that we don't encounter problems where, for instance, data is saved with a culture that uses commas
|
// so that we don't encounter problems where, for instance, data is saved with a culture that uses commas
|
||||||
// for decimals places but is read by a culture that treats commas as number seperators.
|
// for decimals places but is read by a culture that treats commas as number seperators.
|
||||||
WaitCallback realCallback = delegate(object o) { Culture.SetCurrentCulture(); callback(o); };
|
WaitCallback realCallback = delegate(object o)
|
||||||
|
{
|
||||||
|
Culture.SetCurrentCulture();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
callback(o);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
m_log.ErrorFormat(
|
||||||
|
"[UTIL]: Continuing after async_call_method thread terminated with exception {0}{1}",
|
||||||
|
e.Message, e.StackTrace);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
switch (FireAndForgetMethod)
|
switch (FireAndForgetMethod)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue