Exemple #1
0
        static void Main(string[] args)
        {
            ExtThreadPool pool = new ExtThreadPool(new Action <object>(WriteChar));

            pool.Start('*');
            pool.Start('!');

            Console.Read();
        }
Exemple #2
0
        static void Main(string[] args)
        {
            ExtThreadPool <int> pool = new ExtThreadPool <int>(Calculate);

            pool.Start(100);

            while (!pool.IsCompleted)
            {
                Console.Write("!");
                Thread.Sleep(50);
            }

            Console.WriteLine($"\nPool resault: = {pool.Result}");
        }