You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2017/12/04 19:00:24 UTC

[4/5] qpid-proton git commit: PROTON-1710: [C++ binding] Can't run container with less than 1 thread

PROTON-1710: [C++ binding] Can't run container with less than 1 thread


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/25025e9b
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/25025e9b
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/25025e9b

Branch: refs/heads/master
Commit: 25025e9b3dee948f60656c88002a59be598a206d
Parents: 88a927e
Author: Andrew Stitcher <as...@apache.org>
Authored: Mon Dec 4 12:44:07 2017 -0500
Committer: Andrew Stitcher <as...@apache.org>
Committed: Mon Dec 4 13:49:36 2017 -0500

----------------------------------------------------------------------
 proton-c/bindings/cpp/src/proactor_container_impl.cpp | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/25025e9b/proton-c/bindings/cpp/src/proactor_container_impl.cpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/proactor_container_impl.cpp b/proton-c/bindings/cpp/src/proactor_container_impl.cpp
index 2f09f51..a55cdcb 100644
--- a/proton-c/bindings/cpp/src/proactor_container_impl.cpp
+++ b/proton-c/bindings/cpp/src/proactor_container_impl.cpp
@@ -678,6 +678,7 @@ void container::impl::run(int threads) {
 
 #if PN_CPP_SUPPORTS_THREADS
     // Run handler threads
+    threads = std::max(threads, 1); // Ensure at least 1 thread
     typedef std::vector<std::thread*> vt; // pointer vector to work around failures in older compilers
     vt ts(threads-1);
     for (vt::iterator i = ts.begin(); i != ts.end(); ++i) {


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