1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Revert recently added approach to cross-thread lambda survival

Commits reverted:
- 1ed6919148
- 271511726b
This commit is contained in:
Pedro J. Estébanez
2023-11-22 18:53:48 +01:00
parent c2f8fb3015
commit f26328e9a3
4 changed files with 16 additions and 107 deletions

View File

@@ -128,16 +128,11 @@ class GDScript : public Script {
Mutex *mutex = nullptr;
};
static thread_local UpdatableFuncPtr func_ptrs_to_update_thread_local;
static thread_local LocalVector<List<UpdatableFuncPtr *>::Element> func_ptrs_to_update_entries_thread_local;
static UpdatableFuncPtr *func_ptrs_to_update_main_thread;
List<UpdatableFuncPtr *> func_ptrs_to_update;
List<UpdatableFuncPtrElement> func_ptrs_to_update_elems;
Mutex func_ptrs_to_update_mutex;
List<UpdatableFuncPtrElement>::Element *_add_func_ptr_to_update(GDScriptFunction **p_func_ptr_ptr);
static void _remove_func_ptr_to_update(List<UpdatableFuncPtrElement>::Element *p_func_ptr_element);
static void _fixup_thread_function_bookkeeping();
UpdatableFuncPtrElement _add_func_ptr_to_update(GDScriptFunction **p_func_ptr_ptr);
static void _remove_func_ptr_to_update(const UpdatableFuncPtrElement p_func_ptr_element);
#ifdef TOOLS_ENABLED
// For static data storage during hot-reloading.
@@ -559,10 +554,6 @@ public:
virtual void add_named_global_constant(const StringName &p_name, const Variant &p_value) override;
virtual void remove_named_global_constant(const StringName &p_name) override;
/* MULTITHREAD FUNCTIONS */
virtual void thread_exit() override;
/* DEBUGGER FUNCTIONS */
virtual String debug_get_error() const override;