diff --git a/thread_pool.cpp b/thread_pool.cpp index 16defae..6ce0309 100644 --- a/thread_pool.cpp +++ b/thread_pool.cpp @@ -90,7 +90,7 @@ void ThreadPool::set_max_time_per_frame(const bool value) { _max_time_per_frame = value; } -void ThreadPool::cancel_task_wait(Ref job) { +void ThreadPool::cancel_job_wait(Ref job) { ERR_FAIL_COND(!job.is_valid()); _THREAD_SAFE_LOCK_ @@ -121,7 +121,7 @@ void ThreadPool::cancel_task_wait(Ref job) { } } } -void ThreadPool::cancel_task(Ref job) { +void ThreadPool::cancel_job(Ref job) { ERR_FAIL_COND(!job.is_valid()); _THREAD_SAFE_LOCK_ @@ -475,6 +475,6 @@ void ThreadPool::_bind_methods() { ClassDB::bind_method(D_METHOD("register_update"), &ThreadPool::register_update); ClassDB::bind_method(D_METHOD("update"), &ThreadPool::update); - ClassDB::bind_method(D_METHOD("cancel_task_wait", "job"), &ThreadPool::cancel_task_wait); - ClassDB::bind_method(D_METHOD("cancel_task", "job"), &ThreadPool::cancel_task); + ClassDB::bind_method(D_METHOD("cancel_job_wait", "job"), &ThreadPool::cancel_job_wait); + ClassDB::bind_method(D_METHOD("cancel_job", "job"), &ThreadPool::cancel_job); } diff --git a/thread_pool.h b/thread_pool.h index 47df41a..b4f7476 100644 --- a/thread_pool.h +++ b/thread_pool.h @@ -79,8 +79,8 @@ public: float get_max_time_per_frame() const; void set_max_time_per_frame(const bool value); - void cancel_task_wait(Ref job); - void cancel_task(Ref job); + void cancel_job_wait(Ref job); + void cancel_job(Ref job); Ref get_running_job(const Variant &object, const StringName &method); Ref get_queued_job(const Variant &object, const StringName &method);