Class EatText
java.lang.Object
EatText
public class EatText
- extends Object
This class shows how to use a semaphore to make sure that the consumer eatVowels[i]
never eats letters before the producer moreText
has stored them in shared memory.
One producer produces text and several consumers eat it.
This program in inspired in Wiki && Tanembaum Operating Systems 2ed.
- See Also:
- http://en.wikipedia.org/wiki/Producer-consumer_problem
Method Summary |
static void |
main(String[] args)
Main program. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EatText
public EatText()
main
public static void main(String[] args)
- Main program.