Beispiel #1
0
void queue::push(id_type& result, const header_type& header)
{
   put(queue_head_.slice(), header.str());

   result = queue_head_.id++;

   wake_up(); // in case there's a waiter waiting for this new item
}
Beispiel #2
0
void queue::push(id_type& result, const header_type& header, bool sync)
{
   std::string buf;

   header.str(buf);

   put(queue_head_.slice(), buf, sync);

   result = queue_head_.id++;

   wake_up(); // in case there's a waiter waiting for this new item
}