diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2017-09-26 16:33:11 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2017-09-27 11:34:38 +0200 |
commit | 742fe9f527d4d6063b15c4a5a3b0baec14057830 (patch) | |
tree | 5d9acdbb40285be5ed8889ad9c64a169acdbf029 /messagebus | |
parent | 3828f3cad31bdf623794837350e5baa64d9a3ed0 (diff) |
Do the sending in a thread pool too.
Diffstat (limited to 'messagebus')
-rw-r--r-- | messagebus/src/vespa/messagebus/network/rpcnetwork.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/messagebus/src/vespa/messagebus/network/rpcnetwork.cpp b/messagebus/src/vespa/messagebus/network/rpcnetwork.cpp index 47ae831ef6a..1ea5654a632 100644 --- a/messagebus/src/vespa/messagebus/network/rpcnetwork.cpp +++ b/messagebus/src/vespa/messagebus/network/rpcnetwork.cpp @@ -15,7 +15,7 @@ #include <vespa/slobrok/sbmirror.h> #include <vespa/vespalib/component/vtag.h> #include <vespa/vespalib/util/stringfmt.h> -#include <vespa/vespalib/util/threadstackexecutor.h> +#include <vespa/vespalib/util/lambdatask.h> #include <vespa/fnet/scheduler.h> #include <vespa/fnet/transport.h> #include <vespa/fnet/frt/supervisor.h> @@ -86,8 +86,10 @@ RPCNetwork::SendContext::handleVersion(const vespalib::Version *version) } } if (shouldSend) { - _net.send(*this); - delete this; + _net.getExecutor().execute(vespalib::makeLambdaTask([this]() { + _net.send(*this); + delete this; + })); } } |