1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading;
- using System.Threading.Tasks;
- namespace Eserciziotep4
- {
- class Program
- {
- static void Main(string[] args)
- {
- Gestione_File.MakeDirecotry();
- Thread th2 = new Thread(new ThreadStart(GestioneThread.Scrivin));
- Thread th = new Thread(new ThreadStart(GestioneThread.Leggi));
- th.Name = "leggi";
- //th1.Name = "scrivi n";
- th2.Name = "scrivi c";
- th2.Start();
- /*
- th1.Start();
- th.Start();
- th2.Join();
- th1.Join();
- th.Join();
- while (!(th2.IsAlive) && !(th.IsAlive))
- {
- Thread.Sleep(1000);
- }
- */
- Thread.Sleep(1000);
- th2.Join();
- /*
- th1.Start();
- th1.Join();
- */
- th.Start();
- Thread.Sleep(1000);
- th.Join();
-
-
- Console.ReadKey();
- }
- }
- }
|