From 7d6a86dbf7fb524c05e0b7e2b19b4ad8f863e4c6 Mon Sep 17 00:00:00 2001 From: Owen Green Date: Fri, 8 May 2020 15:33:34 +0100 Subject: [PATCH] Ensure message results from synchronous jobs get properly passed on --- include/FluidSCWrapper.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/FluidSCWrapper.hpp b/include/FluidSCWrapper.hpp index 0b1ba03..0df8bc3 100644 --- a/include/FluidSCWrapper.hpp +++ b/include/FluidSCWrapper.hpp @@ -291,7 +291,7 @@ public: } w->mClient.setSynchronous(w->mSynchronous); w->mClient.enqueue(w->mParams); - w->mClient.process(); + w->mResult = w->mClient.process(); } /// Check result and report if bad @@ -301,6 +301,8 @@ public: Result r; ProcessState s = w->mClient.checkProgress(r); + if(w->mSynchronous) r = w->mResult; + if ((s == ProcessState::kDone || s == ProcessState::kDoneStillProcessing) || (w->mSynchronous && s == ProcessState::kNoProcess)) // I think this hinges on the fact that @@ -431,6 +433,7 @@ protected: bool mQueueEnabled{false}; bool mCheckingForDone{false}; // only write to this from RT thread kthx bool mCancelled{false}; + Result mResult; }; ////////////////////////////////////////////////////////////////////////////////