liuxiaolong
2021-07-20 58d904a328c0d849769b483e901a0be9426b8209
src/shm_msg_queue.h
@@ -29,13 +29,12 @@
{
public:
   typedef int64_t RawData;
   typedef ShmObject<SharedQ63<0>> Shmq;
   typedef NamedShmObject<SharedQ63> Shmq;
   typedef Shmq::Data Queue;
   typedef Shmq::ShmType ShmType;
   typedef uint64_t MQId;
   ShmMsgQueue(ShmType &segment, const MQId id, const int len);
   ShmMsgQueue(ShmType &segment, const bool create_or_else_find, const MQId id, const int len);
   ShmMsgQueue(ShmType &segment, const MQId id, Mode mode);
   ShmMsgQueue(const int64_t abs_addr, ShmType &segment, const MQId id);
   ~ShmMsgQueue();
   static bool Remove(ShmType &shm, const MQId id);
@@ -43,10 +42,10 @@
   ShmType &shm() const { return queue_.shm(); }
   int64_t AbsAddr() const { return queue_.offset(); }
   bool Recv(RawData &val, const int timeout_ms) { return queue().Read(val, timeout_ms); }
   // bool Recv(RawData &val, const int timeout_ms) { return queue().Read(val, timeout_ms); }
   bool TryRecv(RawData &val) { return queue().TryRead(val); }
   bool Recv(MsgI &msg, const int timeout_ms) { return Recv(msg.OffsetRef(), timeout_ms); }
   // bool Recv(MsgI &msg, const int timeout_ms) { return Recv(msg.OffsetRef(), timeout_ms); }
   bool TryRecv(MsgI &msg) { return TryRecv(msg.OffsetRef()); }
   static Queue *Find(ShmType &shm, const MQId remote);
   static bool TrySend(ShmType &shm, const MQInfo &remote, const RawData val);