mirror of
https://github.com/Relintai/thread_pool.git
synced 2024-11-14 10:27:51 +01:00
Added reset_stages() to ThreadPoolJob.
This commit is contained in:
parent
bbfa838011
commit
ff3224f7d0
@ -69,6 +69,11 @@ void ThreadPoolJob::set_stage(const int value) {
|
|||||||
_stage = value;
|
_stage = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ThreadPoolJob::reset_stages() {
|
||||||
|
_current_run_stage = 0;
|
||||||
|
_stage = 0;
|
||||||
|
}
|
||||||
|
|
||||||
Variant ThreadPoolJob::get_object() const {
|
Variant ThreadPoolJob::get_object() const {
|
||||||
return _object;
|
return _object;
|
||||||
}
|
}
|
||||||
@ -165,6 +170,8 @@ void ThreadPoolJob::_bind_methods() {
|
|||||||
ClassDB::bind_method(D_METHOD("set_stage", "value"), &ThreadPoolJob::set_stage);
|
ClassDB::bind_method(D_METHOD("set_stage", "value"), &ThreadPoolJob::set_stage);
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "stage"), "set_stage", "get_stage");
|
ADD_PROPERTY(PropertyInfo(Variant::INT, "stage"), "set_stage", "get_stage");
|
||||||
|
|
||||||
|
ClassDB::bind_method(D_METHOD("reset_stages"), &ThreadPoolJob::reset_stages);
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("get_current_execution_time"), &ThreadPoolJob::get_current_execution_time);
|
ClassDB::bind_method(D_METHOD("get_current_execution_time"), &ThreadPoolJob::get_current_execution_time);
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("should_do", "just_check"), &ThreadPoolJob::should_do, DEFVAL(false));
|
ClassDB::bind_method(D_METHOD("should_do", "just_check"), &ThreadPoolJob::should_do, DEFVAL(false));
|
||||||
|
@ -52,6 +52,8 @@ public:
|
|||||||
int get_stage() const;
|
int get_stage() const;
|
||||||
void set_stage(const int value);
|
void set_stage(const int value);
|
||||||
|
|
||||||
|
void reset_stages();
|
||||||
|
|
||||||
Variant get_object() const;
|
Variant get_object() const;
|
||||||
void set_object(const Variant &value);
|
void set_object(const Variant &value);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user