Skip to content

Commit

Permalink
Re #7843. Make variable names more general.
Browse files Browse the repository at this point in the history
  • Loading branch information
RussellTaylor committed Aug 29, 2013
1 parent 4753f18 commit 3ea2711
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions Code/Mantid/MantidQt/API/inc/MantidQtAPI/AlgorithmRunner.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ namespace API
Poco::NObserver<AlgorithmRunner, Mantid::API::Algorithm::ErrorNotification> m_errorObserver;

/// For the asynchronous call in dynamic rebinning. Holds the result of asyncExecute() algorithm call
Poco::ActiveResult<bool> * m_asyncRebinResult;
Poco::ActiveResult<bool> * m_asyncResult;

/// Reference to the algorithm executing asynchronously.
Mantid::API::IAlgorithm_sptr m_asyncRebinAlg;
Mantid::API::IAlgorithm_sptr m_asyncAlg;

};

Expand Down
22 changes: 11 additions & 11 deletions Code/Mantid/MantidQt/API/src/AlgorithmRunner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace API
m_finishedObserver(*this, &AlgorithmRunner::handleAlgorithmFinishedNotification),
m_progressObserver(*this, &AlgorithmRunner::handleAlgorithmProgressNotification),
m_errorObserver(*this, &AlgorithmRunner::handleAlgorithmErrorNotification),
m_asyncRebinResult(NULL)
m_asyncResult(NULL)
{
}

Expand All @@ -37,17 +37,17 @@ namespace API
void AlgorithmRunner::cancelRunningAlgorithm()
{
// Cancel any currently running rebinning algorithms
if (m_asyncRebinAlg)
if (m_asyncAlg)
{
if (m_asyncRebinAlg->isRunning())
m_asyncRebinAlg->cancel();
if (m_asyncRebinResult)
if (m_asyncAlg->isRunning())
m_asyncAlg->cancel();
if (m_asyncResult)
{
m_asyncRebinResult->tryWait(1000);
delete m_asyncRebinResult;
m_asyncRebinResult = NULL;
m_asyncResult->tryWait(1000);
delete m_asyncResult;
m_asyncResult = NULL;
}
m_asyncRebinAlg.reset();
m_asyncAlg.reset();
}
}

Expand All @@ -64,8 +64,8 @@ namespace API
throw std::invalid_argument("AlgorithmRunner::startAlgorithm() given an uninitialized Algorithm");

// Start asynchronous execution
m_asyncRebinAlg = alg;
m_asyncRebinResult = new Poco::ActiveResult<bool>(m_asyncRebinAlg->executeAsync());
m_asyncAlg = alg;
m_asyncResult = new Poco::ActiveResult<bool>(m_asyncAlg->executeAsync());

// Observe the algorithm
alg->addObserver(m_finishedObserver);
Expand Down

0 comments on commit 3ea2711

Please sign in to comment.