Exemple #1
0
        static void Main(string[] args)
        {
            Info info = new Info();
            Producer pro = new Producer(info);
            Consumer con = new Consumer(info);

            Thread th1 = new Thread(new ThreadStart(pro.Produce));
            Thread th2 = new Thread(new ThreadStart(con.Consume));

            th1.Start();
            th2.Start();

            //th1.Join();
            //th2.Join();
        }
Exemple #2
0
 public Consumer(Info info)
 {
     this.info = info;
 }
Exemple #3
0
 public Producer(Info info)
 {
     this.info = info;
 }