| | |
| | | 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); } |
| | | |