#include "semaphore.h" #include "BoundedBuffer.h" #include #include void BoundedBuffer::push(string item){ empty->P(); data.push_back(item); full->V();//increment the number of full slots now. } string BoundedBuffer::pop(){ string item = data.back(); full->P(); data.pop_back(); empty->V(); return item; }