DataPackets/MainTestHarness.cpp
/*
	Each consumer's cycle extracts the packet of specified size from the queue (or waits f there is no
	enough data) and processes the extracted packet using SimpleOutputPacketProcessor.
*/
Each consumer's cycle extracts the packet of specified size from the queue (or waits f there is no
enough data) and processes the extracted packet using SimpleOutputPacketProcessor.
Each consumer ' s cycle extracts the packet of specified size from the queue ( or waits f there is no enough data ) and processes the extracted packet using SimpleOutputPacketProcessor .
void consumerWorker(PacketQueue* packetQueuePointer) {
	PacketQueue& packetQueue = *packetQueuePointer;
	IAmPacketProcessor& packetProcessor = SimpleOutputPacketProcessor();
	for (;;) {
		Packet packet = packetQueue.WaitForPacketOfSize(FIXED_PACKET_SIZE);
		packetProcessor.Process(packet);
	}
}
void consumerWorker ( PacketQueue * packetQueuePointer ) { PacketQueue & packetQueue = * packetQueuePointer ; IAmPacketProcessor & packetProcessor = SimpleOutputPacketProcessor ( ) ; for ( ; ; ) { Packet packet = packetQueue . WaitForPacketOfSize ( FIXED_PACKET_SIZE ) ; packetProcessor . Process ( packet ) ; } }
Each consumer's cycle extracts the packet of specified size from the queue (or waits f there is no
enough data) and processes the extracted packet using SimpleOutputPacketProcessor.
Each consumer ' s cycle extracts the packet of specified size from the queue ( or waits f there is no enough data ) and processes the extracted packet using SimpleOutputPacketProcessor .