| | |
| | | * ===================================================================================== |
| | | */ |
| | | #include "sendq.h" |
| | | #include "shm_queue.h" |
| | | #include "shm_msg_queue.h" |
| | | #include <chrono> |
| | | |
| | | int SendQ::DoSend1Remote(bhome_shm::ShmMsgQueue &mq, const Remote remote, Array &arr) |
| | | using namespace bhome_shm; |
| | | |
| | | int SendQ::DoSend1Remote(ShmMsgQueue &mq, const Remote remote, Array &arr) |
| | | { |
| | | auto FirstNotExpired = [](Array &l) { |
| | | auto Less = [](const TimedMsg &msg, const TimePoint &tp) { return msg.expire() < tp; }; |
| | |
| | | return nprocessed; |
| | | } |
| | | |
| | | int SendQ::DoSend1Remote(bhome_shm::ShmMsgQueue &mq, const Remote remote, ArrayList &al) |
| | | int SendQ::DoSend1Remote(ShmMsgQueue &mq, const Remote remote, ArrayList &al) |
| | | { |
| | | int nsend = 0; |
| | | auto AllSent = [&](Array &arr) { |
| | |
| | | return nsend; |
| | | } |
| | | |
| | | bool SendQ::TrySend(bhome_shm::ShmMsgQueue &mq) |
| | | bool SendQ::TrySend(ShmMsgQueue &mq) |
| | | { |
| | | std::unique_lock<std::mutex> lock(mutex_out_); |
| | | size_t nsend = 0; |