From b283494caeeb489453adc26f4bbf816cce646cf1 Mon Sep 17 00:00:00 2001 From: Owen Green Date: Fri, 8 May 2020 09:43:27 +0100 Subject: [PATCH] Ensure that all results from synchronous jobs get passed on correctly --- include/FluidSCWrapper.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/FluidSCWrapper.hpp b/include/FluidSCWrapper.hpp index a9ba21e..6b530dc 100644 --- a/include/FluidSCWrapper.hpp +++ b/include/FluidSCWrapper.hpp @@ -313,7 +313,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 @@ -323,6 +323,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 @@ -454,6 +456,7 @@ protected: bool mQueueEnabled{false}; bool mCheckingForDone{false}; // only write to this from RT thread kthx bool mCancelled{false}; + Result mResult; }; ////////////////////////////////////////////////////////////////////////////////