Esempio n. 1
0
        private static void ExecuteCounter(ITaskExecutor taskExecutor, int iterationsCount = 100)
        {
            var executionCounter = 0;

            Parallel.For(0, iterationsCount, i =>
            {
                taskExecutor.AddForExecution(() =>
                {
                    executionCounter++;
                    Console.WriteLine(executionCounter);
                });
            }
                         );
        }