lichao
2021-04-08 c338820e4db43ad32c20ff429a038b06bcb980f8
src/shm_queue.cpp
@@ -87,15 +87,14 @@
// 2) find remote queue first, then build msg;
// 1 is about 50% faster than 2, maybe cache related.
bool ShmMsgQueue::Recv(BHMsg &msg, const int timeout_ms)
{
   MsgI imsg;
   if (Read(imsg, timeout_ms)) {
      DEFER1(imsg.Release(shm()););
      return imsg.Unpack(msg);
   } else {
      return false;
   }
}
// bool ShmMsgQueue::Recv(MsgI &imsg, BHMsgHead &head, const int timeout_ms)
// {
//    if (Read(imsg, timeout_ms)) {
//       // DEFER1(imsg.Release(shm()););
//       return imsg.ParseHead(head);
//    } else {
//       return false;
//    }
// }
} // namespace bhome_shm