35 #ifndef THE_THREAD_INTERFACE_HXX_
36 #define THE_THREAD_INTERFACE_HXX_
42 #include <Core/ITKCommon/ThreadUtils/the_transaction.hxx>
73 virtual void delete_this() = 0;
85 static void set_creator(creator_t creator);
90 inline const unsigned int & id()
const
94 virtual void start() = 0;
97 virtual void wait() = 0;
100 virtual void take_a_nap(
const unsigned long & microseconds) = 0;
110 void set_idle_sleep_duration(
bool enable,
unsigned int microseconds = 10000);
114 { push_back(transaction); }
120 void push_back(std::list<the_transaction_t *> & schedule);
124 bool has_work()
const;
135 inline const bool & stopped()
const
138 inline void set_stopped(
bool stopped)
139 { stopped_ = stopped; }
147 void terminate_transactions();
151 void stop_and_go(std::list<the_transaction_t *> & schedule);
155 void flush_and_go(std::list<the_transaction_t *> & schedule);
163 void blab(
const char * message)
const;
171 thread_pool_cb_data_ = cb_data;
180 static creator_t creator_;
194 bool sleep_when_idle_;
195 unsigned int sleep_microsec_;
201 std::list<the_transaction_t *> transactions_;
209 #endif // THE_THREAD_INTERFACE_HXX_
Definition: the_thread_pool.hxx:85
Definition: the_transaction.hxx:55
Definition: the_transaction.hxx:181
Definition: the_mutex_interface.hxx:42
Definition: the_thread_pool.hxx:105
Definition: the_terminator.hxx:120
Definition: the_thread_interface.hxx:57