lichao
2021-05-14 c0d61292ef6bdd8e2e93525b5df6a8ec5c017c32
src/shm_msg_queue.h
@@ -75,14 +75,7 @@
   bool TryRecv(MsgI &msg) { return TryRecv(msg.OffsetRef()); }
   static Queue *Find(ShmType &shm, const MQId remote_id);
   static bool TrySend(ShmType &shm, const MQId remote_id, const RawData val);
   static bool TrySend(ShmType &shm, const MQId remote_id, MsgI msg)
   {
      bool r = false;
      msg.AddRef(); // TODO check if we could avoid addref here.
      DEFER1(if (!r) { msg.Release(); });
      r = TrySend(shm, remote_id, msg.Offset());
      return r;
   }
   static bool TrySend(ShmType &shm, const MQId remote_id, MsgI msg) { return TrySend(shm, remote_id, msg.Offset()); }
   bool TrySend(const MQId remote_id, const MsgI &msg) { return TrySend(shm(), remote_id, msg); }
   bool TrySend(const MQId remote_id, const RawData val) { return TrySend(shm(), remote_id, val); }