21 lines
335 B
C++
21 lines
335 B
C++
![]() |
|
||
|
void BoundedBuffer::push(string item){
|
||
|
/* if(there is some empty slot){//data.size < b
|
||
|
data.push_back(item);
|
||
|
}else{
|
||
|
wait();
|
||
|
}
|
||
|
*/ //replace with
|
||
|
|
||
|
|
||
|
|
||
|
empty.P();
|
||
|
data.push_back(item);
|
||
|
|
||
|
full.V();//increment the number of full slots now.
|
||
|
}
|
||
|
|
||
|
void BoundedBuffer::pop(){
|
||
|
|
||
|
}
|
||
|
|