Producer Consumer
 All Classes Namespaces Files Functions Variables Properties
Public Member Functions | Static Public Attributes | List of all members
producerConsumer.Producer Class Reference

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...
 

Detailed Description

Produces items and Adds them into the specified buffer

Constructor & Destructor Documentation

producerConsumer.Producer.Producer ( IBuffer  buffer,
int  howMany 
)

Constructs a new object of this class.

Parameters
bufferThe buffer where the produced elements must be added to
howManyThe number of element this producer should produce
Exceptions
ArgumentNullExceptionif buffer is null
ArgumentOutOfRangeExceptionif howMany < 0

Member Function Documentation

void producerConsumer.Producer.Run ( )

Runs this Producer
Instantiates the delegate type

ThreadStart

Member Data Documentation

int producerConsumer.Producer.LastElement = -1
static

The last element the producer add to the buffer.
When consumers sees this item, they know that no more elements will follow.


The documentation for this class was generated from the following file: