A buffer with unlimited capacity. More...
Inherits producerConsumer.AbstractBuffer.
Public Member Functions | |
override 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... | |
override void | Add (int element) |
Adds an element to the end of this buffer. More... | |
Public Member Functions inherited from producerConsumer.AbstractBuffer | |
Boolean | IsEmpty () |
Returns true if the buffer is empty, false otherwise More... | |
Additional Inherited Members | |
Protected Attributes inherited from producerConsumer.AbstractBuffer | |
readonly Queue< int > | Queue = new Queue<int>() |
Properties inherited from producerConsumer.AbstractBuffer | |
int | Count [get] |
Properties inherited from producerConsumer.IBuffer | |
int | Count [get] |
The number of elements currently in the buffer More... | |
A buffer with unlimited capacity.
|
virtual |
Adds an element to the end of this buffer.
element | new element to be added to this buffer |
Implements producerConsumer.AbstractBuffer.
|
virtual |
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.
Implements producerConsumer.AbstractBuffer.