using System;
using System.Threading;
public class ThreadPools
{
public const int Repetitions = 1000;
public static void Main()
{
ThreadPool.QueueUserWorkItem(DoWork, '.');
for (int count = 0; count < Repetitions; count++)
{
Console.Write('-');
}
Thread.Sleep(1000);
}
public static void DoWork(object state)
{
for (int count = 0; count < Repetitions; count++)
{
Console.Write(state);
}
}
}