MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / resource_changed_connect

Method resource_changed_connect

core/io/resource_loader.cpp:964–980  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

962}
963
964void ResourceLoader::resource_changed_connect(Resource *p_source, const Callable &p_callable, uint32_t p_flags) {
965 print_lt(vformat("%d\t%ud:%s\t" FUNCTION_STR "\t%d", Thread::get_caller_id(), p_source->get_instance_id(), p_source->get_class(), p_callable.get_object_id()));
966
967 MutexLock lock(thread_load_mutex);
968
969 for (const ThreadLoadTask::ResourceChangedConnection &rcc : curr_load_task->resource_changed_connections) {
970 if (unlikely(rcc.source == p_source && rcc.callable == p_callable)) {
971 return;
972 }
973 }
974
975 ThreadLoadTask::ResourceChangedConnection rcc;
976 rcc.source = p_source;
977 rcc.callable = p_callable;
978 rcc.flags = p_flags;
979 curr_load_task->resource_changed_connections.push_back(rcc);
980}
981
982void ResourceLoader::resource_changed_disconnect(Resource *p_source, const Callable &p_callable) {
983 print_lt(vformat("%d\t%ud:%s\t" FUNCTION_STR "t%d", Thread::get_caller_id(), p_source->get_instance_id(), p_source->get_class(), p_callable.get_object_id()));

Callers

nothing calls this directly

Calls 5

vformatFunction · 0.85
get_instance_idMethod · 0.45
get_classMethod · 0.45
get_object_idMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected