MCPcopy Create free account
hub / github.com/apache/qpid-proton / send

Method send

cpp/examples/multithreaded_client_flow_control.cpp:91–99  ·  view source on GitHub ↗

Thread safe

Source from the content-addressed store, hash-verified

89
90 // Thread safe
91 void send(const proton::message& m) {
92 {
93 std::unique_lock<std::mutex> l(lock_);
94 // Don't queue up more messages than we have credit for
95 while (!work_queue_ || queued_ >= credit_) sender_ready_.wait(l);
96 ++queued_;
97 }
98 work_queue_->add([=]() { this->do_send(m); }); // work_queue_ is thread safe
99 }
100
101 // Thread safe
102 void close() {

Callers 2

do_sendMethod · 0.45
send_threadFunction · 0.45

Calls 3

do_sendMethod · 0.95
waitMethod · 0.65
addMethod · 0.45

Tested by

no test coverage detected