This repository has been archived on 2025-04-11. You can view files and clone it, but cannot push or open issues or pull requests.
csce313-mp4pinie64backup/BoundedBuffer.cpp

15 lines
232 B
C++
Raw Normal View History

2015-11-06 11:30:46 -06:00
void BoundedBuffer::push(string item){
empty.P();
data.push_back(item);
full.V();//increment the number of full slots now.
}
void BoundedBuffer::pop(){
2015-11-06 12:53:10 -06:00
full.P();
data.pop(item);
empty.V();
2015-11-06 11:30:46 -06:00
}