* Switched all operations on the list of clients that could be either sync or async to use Scene.ForEachClient() instead of referencing ClientManager directly

* Added a new [Startup] config option called use_async_when_possible to signal how to run operations that could be either sync or async
* Changed Scene.ForEachClient to respect use_async_when_possible
* Fixing a potential deadlock in Parallel.ForEach by locking on a temporary object instead of the enumerator (which may be shared across multiple invocations on ForEach). Thank you diva
This commit is contained in:
John Hurliman
2009-10-26 16:33:04 -07:00
parent 119cf80e13
commit 4847e62e9f
7 changed files with 44 additions and 28 deletions

View File

@@ -262,7 +262,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
for (int i = 0; i < packetCount; i++)
{
byte[] data = datas[i];
m_scene.ClientManager.ForEach(
m_scene.ForEachClient(
delegate(IClientAPI client)
{
if (client is LLClientView)
@@ -274,7 +274,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
else
{
byte[] data = packet.ToBytes();
m_scene.ClientManager.ForEach(
m_scene.ForEachClient(
delegate(IClientAPI client)
{
if (client is LLClientView)