You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by cl...@apache.org on 2019/04/09 21:05:32 UTC

[qpid-proton] branch master updated: PROTON-2027: use make_work instead of lambda for wider platform coverage

This is an automated email from the ASF dual-hosted git repository.

cliffjansen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git


The following commit(s) were added to refs/heads/master by this push:
     new 5b6ed8e  PROTON-2027: use make_work instead of lambda for wider platform coverage
5b6ed8e is described below

commit 5b6ed8e166c47922ee94502ac30a7d5c235a4406
Author: Cliff Jansen <cl...@apache.org>
AuthorDate: Tue Apr 9 14:04:41 2019 -0700

    PROTON-2027: use make_work instead of lambda for wider platform coverage
---
 cpp/src/container_test.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/cpp/src/container_test.cpp b/cpp/src/container_test.cpp
index 5ad0e57..f48a676 100644
--- a/cpp/src/container_test.cpp
+++ b/cpp/src/container_test.cpp
@@ -409,6 +409,7 @@ void test_container_mt_stop() {
 class test_mt_handler_wq : public test_mt_handler {
 public:
     proton::work_queue *wq_;
+    proton::work call_do_close_;
     proton::connection connection_;
     std::mutex wqlock_;
 
@@ -421,6 +422,7 @@ public:
             if (!connection_) {
                 connection_ = c;
                 wq_ = &c.work_queue();
+                call_do_close_ = make_work(&test_mt_handler_wq::do_close, this);
             }
             else
                 return;
@@ -429,7 +431,7 @@ public:
     }
     void initiate_close() {
         std::unique_lock<std::mutex> l(wqlock_);
-        wq_->add( [this]() { this->do_close(); });
+        wq_->add(call_do_close_);
     }
     void do_close() { connection_.close(); }
     void on_connection_close(proton::connection &) PN_CPP_OVERRIDE { set("closed"); }
@@ -488,4 +490,3 @@ int main(int argc, char** argv) {
 #endif
     return failed;
 }
-


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org