using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using System.Diagnostics; namespace cw1._1 { class Program { static void funkcja() { while (true) { bool zmienna; } } static void Main(string[] args) { int iloscWatkow = 0; try { while (true) { Thread watek1 = new Thread(funkcja); iloscWatkow++; watek1.Start(); Console.WriteLine("Aktulana ilosc uruchomionych watkow: " + iloscWatkow); } } catch { Console.ReadKey(); } } } }