Execute() public method

Executes all tasks previously added to the ThreadManager. The method finishes when all tasks are complete.
public Execute ( ) : void
return void
Ejemplo n.º 1
0
        private void HandleArbiter(int iterations, bool multiThreaded)
        {
            if (multiThreaded)
            {
                for (int i = 0; i < islands.Count; i++)
                {
                    if (islands[i].IsActive())
                    {
                        threadManager.AddTask(arbiterCallback, islands[i]);
                    }
                }

                threadManager.Execute();
            }
            else
            {
                for (int i = 0; i < islands.Count; i++)
                {
                    if (islands[i].IsActive())
                    {
                        arbiterCallback(islands[i]);
                    }
                }
            }
        }