Biblioteca Java - Blame information for rev 3
Subversion Repositories:
Rev | Author | Line No. | Line |
---|---|---|---|
3 | mihai | 1 | /* |
2 | * Test.java | ||
3 | */ | ||
4 | package lab.scd.fire.sincronizareProducerConsumer; | ||
5 | |||
6 | /** | ||
7 | * Class created by @author Mihai HULEA at Feb 22, 2005. | ||
8 | * | ||
9 | * This class is part of the labs project. | ||
10 | * | ||
11 | * | ||
12 | * Aplicatia exemplifica sincronizarea a mai multe fire de executie pentru accesarea | ||
13 | * unei resurse comune. Este exeplificata utilizarea metodelor wait() si notify() si accesaea | ||
14 | * resurselor comune utilizand blocuri synchronized. | ||
15 | */ | ||
16 | public class Test { | ||
17 | public static void main(String[] args){ | ||
18 | Buffer b = new Buffer(); | ||
19 | Producer pro = new Producer(b); | ||
20 | Consumer c = new Consumer(b); | ||
21 | Consumer c2 = new Consumer(b); | ||
22 | pro.start(); | ||
23 | c.start(); | ||
24 | c2.start(); | ||
25 | } | ||
26 | } |