[llvm] r293411 - [Orc][RPC] Have handleOne abandon pending responses upon channel failure.
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 28 20:25:16 PST 2017
Author: lhames
Date: Sat Jan 28 22:25:16 2017
New Revision: 293411
URL: http://llvm.org/viewvc/llvm-project?rev=293411&view=rev
Log:
[Orc][RPC] Have handleOne abandon pending responses upon channel failure.
Modified:
llvm/trunk/include/llvm/ExecutionEngine/Orc/RPCUtils.h
Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/RPCUtils.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/RPCUtils.h?rev=293411&r1=293410&r2=293411&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/RPCUtils.h (original)
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/RPCUtils.h Sat Jan 28 22:25:16 2017
@@ -845,8 +845,10 @@ public:
Error handleOne() {
FunctionIdT FnId;
SequenceNumberT SeqNo;
- if (auto Err = C.startReceiveMessage(FnId, SeqNo))
+ if (auto Err = C.startReceiveMessage(FnId, SeqNo)) {
+ abandonPendingResponses();
return Err;
+ }
if (FnId == ResponseId)
return handleResponse(SeqNo);
auto I = Handlers.find(FnId);
@@ -1250,7 +1252,6 @@ public:
return Error::success();
},
Args...)) {
- this->abandonPendingResponses();
detail::ResultTraits<typename Func::ReturnType>::consumeAbandoned(
std::move(Result));
return std::move(Err);
@@ -1258,7 +1259,6 @@ public:
while (!ReceivedResponse) {
if (auto Err = this->handleOne()) {
- this->abandonPendingResponses();
detail::ResultTraits<typename Func::ReturnType>::consumeAbandoned(
std::move(Result));
return std::move(Err);
More information about the llvm-commits
mailing list