virtual std::string get_command() const;
virtual void start();
virtual Status check();
- Status wait();
+ virtual Status wait();
private:
Status do_wait(bool);
return worker->get_status();
}
+Task::Status InternalTask::wait()
+{
+ Status result;
+ while((result = worker->get_status())==RUNNING) ;
+ return result;
+}
+
InternalTask::Worker::Worker():
status(RUNNING)
virtual std::string get_command() const { return "<internal>"; }
virtual void start();
virtual Status check();
+ virtual Status wait();
};
#endif
virtual std::string get_command() const = 0;
virtual void start() = 0;
virtual Status check() = 0;
+ virtual Status wait() = 0;
};
#endif