Пример #1
0
        private void EvaluateDistances()
        {
            mNextI = 0;
            mNextJ = 1;

            MapPointCall[] mapCalls = new MapPointCall[mThreadCount];
            for (int t = 0; t < mThreadCount; t++)
            {
                mapCalls[t] = new MapPointCall(this);
                Thread thread = new Thread(new ThreadStart(mapCalls[t].Run));
                thread.Name = "MapCallThread-" + t;
                thread.Start();
            }

            bool running = true;

            while (running)
            {
                running = false;
                foreach (MapPointCall c in mapCalls)
                {
                    running |= c.mRunning;
                }
            }
        }
Пример #2
0
        private void EvaluateDistances()
        {
            mNextI = 0;
            mNextJ = 1;

            MapPointCall[] mapCalls = new MapPointCall[mThreadCount];
            for (int t = 0; t < mThreadCount; t++)
            {
                mapCalls[t] = new MapPointCall(this);
                Thread thread = new Thread(new ThreadStart(mapCalls[t].Run));
                thread.Name = "MapCallThread-"+t;
                thread.Start();
            }

            bool running = true;
            while (running)
            {
                running = false;
                foreach (MapPointCall c in mapCalls)
                {
                    running |= c.mRunning;
                }
            }
        }