MCPcopy Create free account
hub / github.com/apache/singa / asyncSendPendingMsg

Method asyncSendPendingMsg

src/io/network/endpoint.cc:537–554  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

535}
536
537void NetworkThread::asyncSendPendingMsg(EndPoint *ep) {
538 // simply put the pending msgs to the send queue
539
540 LOG(INFO) << "There are " << ep->send_.size() << " to-send msgs, and "
541 << ep->to_ack_.size() << " to-ack msgs";
542
543 if (!ep->to_ack_.empty()) {
544 while (!ep->send_.empty()) {
545 ep->to_ack_.push(ep->send_.front());
546 ep->send_.pop();
547 }
548 std::swap(ep->send_, ep->to_ack_);
549 }
550
551 if (ep->send_.size() > 0) {
552 notify(SIG_MSG);
553 }
554}
555
556/**
557 * @brief non-locking send;

Callers 1

afterConnEstMethod · 0.95

Calls 3

emptyMethod · 0.80
sizeMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected