After reading Timer.cs in the mono source, I'm not
convinced that timer.Enabled modification is thread safe. I suspect the statsHeartBeat call to be one of our hot spots because is tries to synchronize not with a lock, but by disabling and enabling itself. I've replaced that with a lock in the hopes that this affects either the 100% bug, or the invoke_void bugs.0.6.0-stable
parent
ebb4ac6853
commit
1eb0fedd93
|
@ -138,8 +138,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
private void statsHeartBeat(object sender, EventArgs e)
|
private void statsHeartBeat(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
m_report.Enabled = false;
|
// Know what's not thread safe in Mono... modifying timers.
|
||||||
|
// System.Console.WriteLine("Firing Stats Heart Beat");
|
||||||
|
lock (m_report)
|
||||||
|
{
|
||||||
// Packet is already initialized and ready for data insert
|
// Packet is already initialized and ready for data insert
|
||||||
|
|
||||||
|
|
||||||
|
@ -256,7 +258,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
handlerSendStatResult(statpack);
|
handlerSendStatResult(statpack);
|
||||||
}
|
}
|
||||||
resetvalues();
|
resetvalues();
|
||||||
m_report.Enabled = true;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void resetvalues()
|
private void resetvalues()
|
||||||
|
|
Loading…
Reference in New Issue