mirror of
https://github.com/Relintai/thread_pool.git
synced 2024-11-12 10:25:29 +01:00
Invert the logic of the 2 control flow functions name.
This commit is contained in:
parent
c69a2a9db4
commit
7046fa7b08
@ -92,7 +92,7 @@ float ThreadPoolJob::get_current_execution_time() {
|
|||||||
return (OS::get_singleton()->get_system_time_msecs() - _start_time) / 1000.0;
|
return (OS::get_singleton()->get_system_time_msecs() - _start_time) / 1000.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ThreadPoolJob::should_skip(const bool just_check) {
|
bool ThreadPoolJob::should_do(const bool just_check) {
|
||||||
if (just_check) {
|
if (just_check) {
|
||||||
return _current_run_stage < _stage;
|
return _current_run_stage < _stage;
|
||||||
}
|
}
|
||||||
@ -107,7 +107,7 @@ bool ThreadPoolJob::should_skip(const bool just_check) {
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
bool ThreadPoolJob::should_continue() {
|
bool ThreadPoolJob::should_return() {
|
||||||
if (_cancelled)
|
if (_cancelled)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -284,8 +284,8 @@ void ThreadPoolJob::_bind_methods() {
|
|||||||
|
|
||||||
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_skip", "just_check"), &ThreadPoolJob::should_skip, DEFVAL(false));
|
ClassDB::bind_method(D_METHOD("should_do", "just_check"), &ThreadPoolJob::should_do, DEFVAL(false));
|
||||||
ClassDB::bind_method(D_METHOD("should_continue"), &ThreadPoolJob::should_continue);
|
ClassDB::bind_method(D_METHOD("should_return"), &ThreadPoolJob::should_return);
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("execute"), &ThreadPoolJob::execute);
|
ClassDB::bind_method(D_METHOD("execute"), &ThreadPoolJob::execute);
|
||||||
|
|
||||||
|
@ -60,8 +60,8 @@ public:
|
|||||||
|
|
||||||
float get_current_execution_time();
|
float get_current_execution_time();
|
||||||
|
|
||||||
bool should_skip(const bool just_check = false);
|
bool should_do(const bool just_check = false);
|
||||||
bool should_continue();
|
bool should_return();
|
||||||
|
|
||||||
void execute();
|
void execute();
|
||||||
void setup(const Variant &obj, const StringName &p_method, VARIANT_ARG_LIST);
|
void setup(const Variant &obj, const StringName &p_method, VARIANT_ARG_LIST);
|
||||||
|
Loading…
Reference in New Issue
Block a user