From e1d08021abf756766e3f153b6998f7eaa68e4c67 Mon Sep 17 00:00:00 2001 From: Sergey Linev <S.Linev@gsi.de> Date: Thu, 6 Sep 2018 14:37:04 +0200 Subject: [PATCH] webgui: use timed wait operations in RCanvas painter --- gui/canvaspainter/v7/src/TCanvasPainter.cxx | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/gui/canvaspainter/v7/src/TCanvasPainter.cxx b/gui/canvaspainter/v7/src/TCanvasPainter.cxx index 30115d864c5..69150ace1a7 100644 --- a/gui/canvaspainter/v7/src/TCanvasPainter.cxx +++ b/gui/canvaspainter/v7/src/TCanvasPainter.cxx @@ -358,7 +358,7 @@ void ROOT::Experimental::TCanvasPainter::CanvasUpdated(uint64_t ver, bool async, // wait that canvas is painted if (!async) - fWindow->WaitFor([this, ver](double tm) { + fWindow->WaitForTimed([this, ver](double) { if (fSnapshotDelivered >= ver) return 1; @@ -367,10 +367,8 @@ void ROOT::Experimental::TCanvasPainter::CanvasUpdated(uint64_t ver, bool async, if (fWebConn.empty() && !fWindow->HasConnection(0,false)) return -2; - // make default timeout of 100 seconds - // TODO: make it configurable - if (tm > 100) - return -3; + // time is not important - timeout handle before + // if (tm > 100) return -3; // continue waiting return 0; @@ -407,7 +405,7 @@ void ROOT::Experimental::TCanvasPainter::DoWhenReady(const std::string &name, co if (async) return; - int res = fWindow->WaitFor([this, cmd](double tm) { + int res = fWindow->WaitForTimed([this, cmd](double) { if (cmd->fReady) { R__DEBUG_HERE("CanvasPainter") << "Command " << cmd->fName << " done"; return cmd->fResult ? 1 : -1; @@ -417,10 +415,8 @@ void ROOT::Experimental::TCanvasPainter::DoWhenReady(const std::string &name, co if (!fWindow->HasConnection(cmd->fConnId, false)) return -2; - // make default timeout of 100 seconds - // TODO: make it configurable - if (tm > 100.) - return -3; + // time is not important - timeout handle before + // if (tm > 100.) return -3; return 0; }); -- GitLab