ALL > Computer and Education > courses > university courses > undergraduate courses > Operating System > CLASS (2016-2017-1)-62903-06102-1 > 2014329620056-renyajie > homework 5_project >
Producer-Consumer Problem Version 0
👤 Author: by x20056 2016-11-08 18:50:42

package question;

/**
* A simple program to simulate the typical process of producer and consumer
* @author crystal sugar
* @version 1.0
*/

/**
* A class defined for the commodity for Producer and Consumer
*/
class ShareData{
//Use Char to represent the commodity
private char c;
//This variable is used to function as signal() in textbook.
private boolean putFlag = false;
//Use the reserved word synchronized to keep other process from run
//these following c

Please login to reply. Login

Reversion History

Loading...
No reversions found.