Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.3] Merge commit godotengine/godot@711c725 #863

Merged
merged 25 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
1c4849b
ResourceLoader: Revert workaround resource loading crashes due to bug…
RandomShaper Jun 19, 2024
257dd2f
Fix use condition_variable after free
Ratio2 Jul 29, 2024
ece3925
ResourceLoader: Properly push & pop TLS state on recursive load tasks
RandomShaper Jul 10, 2024
ea28ac5
ResourceLoader: Enhance deadlock prevention
RandomShaper Jul 10, 2024
8a78f5c
ResourceLoader: Optimize remap check by deferring until a non-mutex zone
RandomShaper Jul 10, 2024
b3e46a9
ResourceLoader: Fix edge cases in the management of user tokens
RandomShaper Jul 15, 2024
c75c50e
WorkerThreadPool (plus friends): Overhaul unlock allowance zones
RandomShaper Jul 18, 2024
fe2e862
ResourceLoader: Use better error handling for possible engine bugs
RandomShaper Aug 13, 2024
1fd87e8
Change warning muting so it affects all levels, but locally
RandomShaper Aug 26, 2024
98e7711
ResourceLoader: Handle another case of user tokens
RandomShaper Aug 28, 2024
f2d0f66
Fix ResourceLoader is not verbosely printing a resource path on loading
gongpha Jul 29, 2024
cd32705
ResourceLoader: Simplify handling of unregistered tasks
RandomShaper Sep 5, 2024
f806cfb
ResourceLoader: Add thread-aware resource changed mechanism
RandomShaper Sep 5, 2024
ea651a1
ResourceLoader: Add last resort life-time insurance for tokens
RandomShaper Sep 5, 2024
251237d
ResourceLoader: Fixup resource changed feature
RandomShaper Sep 6, 2024
9ed06bc
EditorResourcePreview: Let loads complete after exit requested
RandomShaper Sep 13, 2024
a0c1744
ResourceLoader: Report error if resource type unrecognized
RandomShaper Sep 23, 2024
a5f6e49
Fix deadlocks related to ClassDB queries about global classes
RandomShaper Nov 8, 2024
178a126
fix animation snapping in seconds mode
UnfavorableEnhancer Nov 11, 2024
ce608dc
Windows: Avoid child processes inheriting all file handles
RandomShaper Nov 11, 2024
f89d1e0
Merge pull request #96606 from RandomShaper/res_loader_cherrypicks_4.3
akien-mga Nov 15, 2024
758a421
Merge pull request #98964 from RandomShaper/fix_classdb_deadlock_4.3
akien-mga Nov 15, 2024
305bdbf
Merge pull request #99058 from UnfavorableEnhancer/animation_snapping…
akien-mga Nov 15, 2024
711c725
Merge pull request #99108 from RandomShaper/win_less_inheritance_4.3
akien-mga Nov 15, 2024
c0ff7ba
Merge commit godotengine/godot@711c725cf1b641d05d6cc988a64601622e48fe4a
Spartan322 Nov 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions core/io/resource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@
#include <stdio.h>

void Resource::emit_changed() {
if (ResourceLoader::is_within_load() && MessageQueue::get_main_singleton() != MessageQueue::get_singleton() && !MessageQueue::get_singleton()->is_flushing()) {
// Let the connection happen on the call queue, later, since signals are not thread-safe.
call_deferred("emit_signal", CoreStringName(changed));
} else {
emit_signal(CoreStringName(changed));
if (ResourceLoader::is_within_load() && !Thread::is_main_thread()) {
ResourceLoader::resource_changed_emit(this);
return;
}

emit_signal(CoreStringName(changed));
}

void Resource::_resource_path_changed() {
Expand Down Expand Up @@ -168,22 +168,22 @@ bool Resource::editor_can_reload_from_file() {
}

void Resource::connect_changed(const Callable &p_callable, uint32_t p_flags) {
if (ResourceLoader::is_within_load() && MessageQueue::get_main_singleton() != MessageQueue::get_singleton() && !MessageQueue::get_singleton()->is_flushing()) {
// Let the check and connection happen on the call queue, later, since signals are not thread-safe.
callable_mp(this, &Resource::connect_changed).call_deferred(p_callable, p_flags);
if (ResourceLoader::is_within_load() && !Thread::is_main_thread()) {
ResourceLoader::resource_changed_connect(this, p_callable, p_flags);
return;
}

if (!is_connected(CoreStringName(changed), p_callable) || p_flags & CONNECT_REFERENCE_COUNTED) {
connect(CoreStringName(changed), p_callable, p_flags);
}
}

void Resource::disconnect_changed(const Callable &p_callable) {
if (ResourceLoader::is_within_load() && MessageQueue::get_main_singleton() != MessageQueue::get_singleton() && !MessageQueue::get_singleton()->is_flushing()) {
// Let the check and disconnection happen on the call queue, later, since signals are not thread-safe.
callable_mp(this, &Resource::disconnect_changed).call_deferred(p_callable);
if (ResourceLoader::is_within_load() && !Thread::is_main_thread()) {
ResourceLoader::resource_changed_disconnect(this, p_callable);
return;
}

if (is_connected(CoreStringName(changed), p_callable)) {
disconnect(CoreStringName(changed), p_callable);
}
Expand Down
Loading
Loading