From 7ecf913256fb396e3027aac3318d996a716a52ef Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Oct 2021 23:29:21 +0800 Subject: + job system --- Runtime/Threading/Job.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Runtime/Threading/Job.h (limited to 'Runtime/Threading/Job.h') diff --git a/Runtime/Threading/Job.h b/Runtime/Threading/Job.h new file mode 100644 index 0000000..db89feb --- /dev/null +++ b/Runtime/Threading/Job.h @@ -0,0 +1,17 @@ +#pragma once + +// 任务的抽象基类 +class Job +{ +public: + Job(); + virtual ~Job(); + + virtual void Process() = 0; + virtual bool IsFinished() = 0; + virtual void Dispacth(void* param) = 0; // call in main thread + +protected: + int m_ID; // Job ID + +}; \ No newline at end of file -- cgit v1.1-26-g67d0