wrapper: tidying

nix
Owen Green 6 years ago
parent b0b2c7d3b3
commit fad43f18b2

@ -219,26 +219,15 @@ public:
/// The calc function. Checks to see if we've cancelled, spits out progress, launches tidy up when complete /// The calc function. Checks to see if we've cancelled, spits out progress, launches tidy up when complete
void poll(int) void poll(int)
{ {
// if(!mClient.done()) out0(0) = static_cast<float>(mClient.progress());
// {
out0(0) = static_cast<float>(mClient.progress());
// }
// else {
if(0 == pollCounter++)
{
mWorld->ft->fDoAsynchronousCommand(mWorld, nullptr, Wrapper::getName(), this,
postProcess, exchangeBuffers, tidyUp, destroy,
0, nullptr);
}
pollCounter %= checkThreadInterval;
// if(mClient.state() == kDone)
// mDone = true;
// mCalcFunc = mWorld->ft->fClearUnitOutputs;
// if(!mDone)
// } if(0 == pollCounter++)
{
mWorld->ft->fDoAsynchronousCommand(mWorld, nullptr, Wrapper::getName(), this,
postProcess, exchangeBuffers, tidyUp, destroy,
0, nullptr);
}
pollCounter %= checkThreadInterval;
} }
static void nop(Unit*, int) {} static void nop(Unit*, int) {}
@ -253,11 +242,8 @@ public:
if (!result.ok()) if (!result.ok())
{ {
std::cout << "ERROR: " << Wrapper::getName() << ": " << result.message().c_str() << std::endl; std::cout << "ERROR: " << Wrapper::getName() << ": " << result.message().c_str() << std::endl;
// w->mDone = true;
return; return;
} }
// w->mClient.setSynchronous(mSynchronous);
// mClient.setQueu
w->mClient.enqueue(w->mParams); w->mClient.enqueue(w->mParams);
w->mClient.process(); w->mClient.process();
} }
@ -311,8 +297,6 @@ public:
{ {
static_cast<Wrapper *>(unit)->mClient.cancel(); static_cast<Wrapper *>(unit)->mClient.cancel();
} }
private: private:
static Result validateParameters(NonRealTime *w) static Result validateParameters(NonRealTime *w)

Loading…
Cancel
Save