diff options
author | reduz <reduzio@gmail.com> | 2022-06-22 13:46:46 +0200 |
---|---|---|
committer | reduz <reduzio@gmail.com> | 2022-06-22 13:46:46 +0200 |
commit | e772b65d92dbd5b36fb003458d7fe0fd528abcea (patch) | |
tree | aca74602fef05e8f80689345af9ba2e33afe846d /scene/debugger | |
parent | c18d0f20357a11bd9cfa2f57b8b9b500763413bc (diff) |
Remake resource thread safety and API
* Ensures thread safety when resources are destroyed.
* Simplified API by always forcing `ResourceCache::get_ref`, which needs less hacks and is fully thread safe.
* Removed RWLock for resources because its not possible to use for the new logic. Should not be a problem.
Supersedes #57533
Diffstat (limited to 'scene/debugger')
-rw-r--r-- | scene/debugger/scene_debugger.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/debugger/scene_debugger.cpp b/scene/debugger/scene_debugger.cpp index a54e728c1b..e9c33b1839 100644 --- a/scene/debugger/scene_debugger.cpp +++ b/scene/debugger/scene_debugger.cpp @@ -701,7 +701,7 @@ void LiveEditor::_res_set_func(int p_id, const StringName &p_prop, const Variant return; } - Ref<Resource> r = ResourceCache::get(resp); + Ref<Resource> r = ResourceCache::get_ref(resp); if (!r.is_valid()) { return; } @@ -728,7 +728,7 @@ void LiveEditor::_res_call_func(int p_id, const StringName &p_method, const Vari return; } - Ref<Resource> r = ResourceCache::get(resp); + Ref<Resource> r = ResourceCache::get_ref(resp); if (!r.is_valid()) { return; } |