Produces items and Adds them into the specified buffer More...
Public Member Functions | |
Producer (IBuffer buffer, int howMany) | |
Constructs a new object of this class. More... | |
void | Run () |
Runs this Producer Instantiates the delegate type More... | |
Static Public Attributes | |
static int | LastElement = -1 |
The last element the producer add to the buffer. When consumers sees this item, they know that no more elements will follow. More... | |
Produces items and Adds them into the specified buffer
producerConsumer.Producer.Producer | ( | IBuffer | buffer, |
int | howMany | ||
) |
Constructs a new object of this class.
buffer | The buffer where the produced elements must be added to |
howMany | The number of element this producer should produce |
ArgumentNullException | if buffer is null |
ArgumentOutOfRangeException | if howMany < 0 |
void producerConsumer.Producer.Run | ( | ) |
Runs this Producer
Instantiates the delegate type
ThreadStart
|
static |
The last element the producer add to the buffer.
When consumers sees this item, they know that no more elements will follow.