summaryrefslogtreecommitdiff
path: root/include/Task.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/Task.h')
-rw-r--r--include/Task.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/include/Task.h b/include/Task.h
index 456f8f3..f728e62 100644
--- a/include/Task.h
+++ b/include/Task.h
@@ -2,7 +2,9 @@
#define __TASK_H__
#ifdef __cplusplus
-#include "Exceptions.h"
+#include <unistd.h>
+#include <vector.h>
+#include <Exceptions.h>
#define TASK_ON_HOLD 0
#define TASK_DONE 1
@@ -14,14 +16,21 @@ class Task : public Base {
virtual String GetName();
int Run();
int GetState();
- int Suspend() throw (GeneralException);
- void Resume(int) throw (GeneralException);
+ void Suspend() throw (GeneralException);
+ bool WaitFor(Handle *);
+ bool WaitFor(Task *);
+ bool WaitFor(pid_t);
+ bool WaitFor(struct timeval);
protected:
virtual int Do();
private:
int state;
bool suspended;
+ vector<Handle *> w4ha;
+ vector<Task *> w4ta;
+ vector<pid_t> w4pr;
+ vector<struct timeval> w4to;
};
#else