Skip to content

Commit

Permalink
Add priority argument to UnloadResourcesAsync
Browse files Browse the repository at this point in the history
  • Loading branch information
Malkierian committed Dec 18, 2024
1 parent 72bd95b commit fecdb1f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/resource/ResourceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,12 +346,12 @@ void ResourceManager::DirtyResources(const std::string& searchMask) {
DirtyResources({ { searchMask }, {}, mDefaultCacheOwner, mDefaultCacheArchive });
}

void ResourceManager::UnloadResourcesAsync(const std::string& searchMask) {
UnloadResourcesAsync({ { searchMask }, {}, mDefaultCacheOwner, mDefaultCacheArchive });
void ResourceManager::UnloadResourcesAsync(const std::string& searchMask, BS::priority_t priority) {
UnloadResourcesAsync({ { searchMask }, {}, mDefaultCacheOwner, mDefaultCacheArchive }, priority);
}

void ResourceManager::UnloadResourcesAsync(const ResourceFilter& filter) {
mThreadPool->submit_task([this, filter]() -> void { UnloadResourcesProcess(filter); });
void ResourceManager::UnloadResourcesAsync(const ResourceFilter& filter, BS::priority_t priority) {
mThreadPool->submit_task([this, filter]() -> void { UnloadResourcesProcess(filter); }, priority);
}

void ResourceManager::UnloadResources(const std::string& searchMask) {
Expand Down
4 changes: 2 additions & 2 deletions src/resource/ResourceManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ class ResourceManager {
void DirtyResources(const ResourceFilter& filter);
void UnloadResources(const std::string& searchMask);
void UnloadResources(const ResourceFilter& filter);
void UnloadResourcesAsync(const std::string& searchMask);
void UnloadResourcesAsync(const ResourceFilter& filter);
void UnloadResourcesAsync(const std::string& searchMask, BS::priority_t priority = BS::pr::normal);
void UnloadResourcesAsync(const ResourceFilter& filter, BS::priority_t priority = BS::pr::normal);

bool OtrSignatureCheck(const char* fileName);
bool IsAltAssetsEnabled();
Expand Down

0 comments on commit fecdb1f

Please sign in to comment.