35 #ifndef THE_TERMINATOR_HXX_
36 #define THE_TERMINATOR_HXX_
38 #if defined(USE_THE_TERMINATORS) || defined(USE_ITK_TERMINATORS)
44 #include <Core/Utils/Log.h>
51 #include <Core/ITKCommon/ThreadUtils/the_thread_storage.hxx>
52 #include <Core/ITKCommon/the_utils.hxx>
65 inline const std::string & id()
const
69 inline const bool & termination_requested()
const
70 {
return termination_requested_; }
74 inline void terminate_on_request()
const
79 if (termination_requested_)
81 CORE_LOG_MESSAGE(
"Termination requested in the_terminator_t class");
88 virtual void terminate();
91 void throw_exception()
const;
94 static bool verify_termination();
99 static bool should_terminate_immediately();
102 static std::list<the_terminator_t *> & terminators();
114 bool termination_requested_;
125 virtual void terminate();
126 virtual bool verify_termination();
132 virtual void lock() = 0;
133 virtual void unlock() = 0;
137 std::list<the_terminator_t *> terminators_;
141 #endif // THE_TERMINATOR_HXX_
Definition: the_terminator.hxx:58
Definition: the_terminator.hxx:120