From 97c68514c4d88cf94272332f1e390cc2e0bcd394 Mon Sep 17 00:00:00 2001 From: LATRio Date: Sat, 25 Sep 2021 22:07:13 +0900 Subject: Use Callable in Thread::start --- core/core_bind.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'core/core_bind.h') diff --git a/core/core_bind.h b/core/core_bind.h index a5d5a7c8ce..84a284f948 100644 --- a/core/core_bind.h +++ b/core/core_bind.h @@ -539,8 +539,7 @@ protected: Variant ret; Variant userdata; SafeFlag active; - Object *target_instance = nullptr; - StringName target_method; + Callable target_callable; ::Thread thread; static void _bind_methods(); static void _start_func(void *ud); @@ -553,7 +552,7 @@ public: PRIORITY_MAX }; - Error start(Object *p_instance, const StringName &p_method, const Variant &p_userdata = Variant(), Priority p_priority = PRIORITY_NORMAL); + Error start(const Callable &p_callable, const Variant &p_userdata = Variant(), Priority p_priority = PRIORITY_NORMAL); String get_id() const; bool is_active() const; Variant wait_to_finish(); -- cgit v1.2.3