From d9261bdb05cd0863a2c3747c812871dbb851646e Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Wed, 14 Aug 2019 11:45:34 +0200 Subject: Replace signal-based abort handling by query-based handling The abort handling is currently only used to process Ctrl-C from Matlab. Since Matlab R2019a, it appears that calling utIsInterruptPending() from a thread other than the main thread will crash. The previous approach of checking utIsInterruptPending() in a thread, and then signalling the running algorithm was therefore broken. --- include/astra/Algorithm.h | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'include/astra/Algorithm.h') diff --git a/include/astra/Algorithm.h b/include/astra/Algorithm.h index af9e41d..393baf0 100644 --- a/include/astra/Algorithm.h +++ b/include/astra/Algorithm.h @@ -93,26 +93,11 @@ public: */ virtual void setGPUIndex(int /*_iGPUIndex*/) { }; - /** Signal the algorithm it should abort soon. - * This is intended to be called from a different thread - * while the algorithm is running. There are no guarantees - * on how soon the algorithm will abort. The state of the - * algorithm object will be consistent (so it is safe to delete it - * normally afterwards), but the algorithm's output is undefined. - * - * Note that specific algorithms may give guarantees on their - * state after an abort. Check their documentation for details. - */ - virtual void signalAbort() { m_bShouldAbort = true; } - protected: //< Has this class been initialized? bool m_bIsInitialized; - //< If this is set, the algorithm should try to abort as soon as possible. - volatile bool m_bShouldAbort; - private: /** * Private copy constructor to prevent CAlgorithms from being copied. -- cgit v1.2.3