From 1ed776e2662a8a0c82cce343dadf60431d49b297 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 31 Oct 2021 12:01:10 +0100 Subject: [PATCH] Renamed cancel_task to cancel_job, and cancel_task_wait to cance_job_wait --- thread_pool.cpp | 8 ++++---- thread_pool.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) 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);