Example #1
0
  // returns false if queue was full
  bool tryPut(T t){
    if (queue.bounded_push(t)) {
      ready.signal();
      return true;
    }

    return false;
  }
Example #2
0
 void putWithoutSignal(T t) {
   while (!queue.bounded_push(t));
 }
Example #3
0
void bProduce(int x)
{
    bQ.bounded_push(x);
}