Inherited by producerConsumer.AbstractBuffer.
Public Member Functions | |
bool | IsEmpty () |
Returns true if the buffer is empty, false otherwise More... | |
int | Take () |
Removes and returns the first element from this buffer. If the buffer is empty, the thread calling Tak() must wait until another thread Puts an element. More... | |
void | Add (int element) |
Adds an element to the end of this buffer. More... | |
Properties | |
int | Count [get] |
The number of elements currently in the buffer More... | |
void producerConsumer.IBuffer.Add | ( | int | element | ) |
Adds an element to the end of this buffer.
element | new element to be added to this buffer |
Implemented in producerConsumer.BoundedBuffer, producerConsumer.UnboundedBuffer, and producerConsumer.AbstractBuffer.
bool producerConsumer.IBuffer.IsEmpty | ( | ) |
Returns true if the buffer is empty, false otherwise
Implemented in producerConsumer.AbstractBuffer.
int producerConsumer.IBuffer.Take | ( | ) |
Removes and returns the first element from this buffer.
If the buffer is empty, the thread calling Tak() must wait until another thread Puts an element.
Implemented in producerConsumer.BoundedBuffer, producerConsumer.AbstractBuffer, and producerConsumer.UnboundedBuffer.
|
get |
The number of elements currently in the buffer