Merge pull request #73862 from RandomShaper/fix_subthreaded_res_load

Lift restriction that resource load thread requester has to be the initiator
This commit is contained in:
Rémi Verschelde 2023-03-02 11:26:54 +01:00
commit 4fceabc30c
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 0 additions and 6 deletions

View File

@ -310,12 +310,6 @@ Error ResourceLoader::load_threaded_request(const String &p_path, const String &
thread_load_mutex->unlock();
ERR_FAIL_V_MSG(ERR_INVALID_PARAMETER, "There is no thread loading source resource '" + p_source_resource + "'.");
}
//must be loading from this thread
if (thread_load_tasks[p_source_resource].loader_id != Thread::get_caller_id()) {
thread_load_mutex->unlock();
ERR_FAIL_V_MSG(ERR_INVALID_PARAMETER, "Threading loading resource'" + local_path + " failed: Source specified: '" + p_source_resource + "' but was not called by it.");
}
//must not be already added as s sub tasks
if (thread_load_tasks[p_source_resource].sub_tasks.has(local_path)) {
thread_load_mutex->unlock();