client cancel() w/ tryCall()

Fail soft if  worker thread has already stopped.
This commit is contained in:
Michael Davidsaver
2021-04-16 18:57:25 -07:00
parent 1e08b6faf0
commit 8555bb63ef
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -172,8 +172,8 @@ struct GPROp : public OperationBase
{
decltype (done) junk;
decltype (onInit) junkI;
bool ret;
loop.call([this, &junk, &junkI, &ret](){
bool ret = false;
(void)loop.tryCall([this, &junk, &junkI, &ret](){
ret = _cancel(false);
junk = std::move(done);
junkI = std::move(onInit);