From e772b65d92dbd5b36fb003458d7fe0fd528abcea Mon Sep 17 00:00:00 2001 From: reduz Date: Wed, 22 Jun 2022 13:46:46 +0200 Subject: 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 --- scene/debugger/scene_debugger.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scene/debugger') 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 r = ResourceCache::get(resp); + Ref 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 r = ResourceCache::get(resp); + Ref r = ResourceCache::get_ref(resp); if (!r.is_valid()) { return; } -- cgit v1.2.3