void ResourceLoaderMT::Load(ResourcePtr pResource) { MUTEX_ENTER(mMutex); int index = 0; while (index < mResourceQueue.Size()) { if (pResource->GetPriority() > mResourceQueue[index]->GetPriority()) break; ++index; } mResourceQueue.Insert(index, pResource); }