* Converts ClientManager.ForEach() (and as a result, Scene.ForEachClient()) to use a non-blocking parallel method when operating in async mode

* Minor code readability cleanup
This commit is contained in:
John Hurliman
2009-10-27 00:26:56 -07:00
parent 322b39804d
commit c75d415648
4 changed files with 12 additions and 8 deletions

View File

@@ -204,7 +204,10 @@ namespace OpenSim.Framework
public void ForEach(Action<IClientAPI> action)
{
IClientAPI[] localArray = m_array;
Parallel.ForEach<IClientAPI>(localArray, action);
Parallel.For(0, localArray.Length,
delegate(int i)
{ action(localArray[i]); }
);
}
/// <summary>