| 962 | } |
| 963 | |
| 964 | void 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 | |
| 982 | void 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())); |
nothing calls this directly
no test coverage detected