Każdy wątek posiada metodę Suspend, która wstrzymuje jego wykonywanie. Ktoś mógłby napisać takiego “potworka”:class Program
{
staticvoid Main(string[] args)
{
Thread thread=new Thread(Run);
thread.Start();
Thread.Sleep(1000);
thread.Suspend();
Thread.Sleep(5000);
thread.Resume();
}
staticprivatevoid Run()
{
while(true)
{
Console.WriteLine("Running...");
}
}
}
Używanie Suspend jest bardzo złą praktyką i może ...
Trending Articles
More Pages to Explore .....