diff options
author | Nicky <nicky.dasmijn@gmail.com> | 2022-04-18 19:57:34 +0200 |
---|---|---|
committer | Nicky <nicky.dasmijn@gmail.com> | 2022-04-18 19:57:34 +0200 |
commit | ca839307f9edb5f5b6807a2a7185733518c241cf (patch) | |
tree | abec0f3c2b8aa5a8f821f306e19b5a54599a275f /indra/newview/llviewerassetstorage.cpp | |
parent | 2b151e0aefd54671e1be504269f10318d303dccb (diff) | |
parent | dbb044e9bb1c3d155ceb6736e2d6c9c1360b4882 (diff) |
Merge remote-tracking branch 'origin/DRTVWR-543-maint' into DRTVWR-543-maint_cmake
Diffstat (limited to 'indra/newview/llviewerassetstorage.cpp')
-rw-r--r-- | indra/newview/llviewerassetstorage.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp index 6aa1273174..70065cb5a0 100644 --- a/indra/newview/llviewerassetstorage.cpp +++ b/indra/newview/llviewerassetstorage.cpp @@ -353,7 +353,7 @@ void LLViewerAssetStorage::checkForTimeouts() // Restore requests LLCoprocedureManager* manager = LLCoprocedureManager::getInstance(); while (mCoroWaitList.size() > 0 - && manager->count(VIEWER_ASSET_STORAGE_CORO_POOL) < LLCoprocedureManager::DEFAULT_QUEUE_SIZE) + && manager->count(VIEWER_ASSET_STORAGE_CORO_POOL) < (LLCoprocedureManager::DEFAULT_QUEUE_SIZE - 1)) { CoroWaitList &request = mCoroWaitList.front(); @@ -425,13 +425,14 @@ void LLViewerAssetStorage::queueRequestHttp( if (!duplicate) { // Coroutine buffer has fixed size (synchronization buffer, so we have no alternatives), so buffer any request above limit - if (LLCoprocedureManager::instance().count(VIEWER_ASSET_STORAGE_CORO_POOL) < LLCoprocedureManager::DEFAULT_QUEUE_SIZE) + LLCoprocedureManager* manager = LLCoprocedureManager::getInstance(); + if (manager->count(VIEWER_ASSET_STORAGE_CORO_POOL) < (LLCoprocedureManager::DEFAULT_QUEUE_SIZE - 1)) { bool with_http = true; bool is_temp = false; LLViewerAssetStatsFF::record_enqueue(atype, with_http, is_temp); - LLCoprocedureManager::instance().enqueueCoprocedure(VIEWER_ASSET_STORAGE_CORO_POOL, "LLViewerAssetStorage::assetRequestCoro", + manager->enqueueCoprocedure(VIEWER_ASSET_STORAGE_CORO_POOL, "LLViewerAssetStorage::assetRequestCoro", boost::bind(&LLViewerAssetStorage::assetRequestCoro, this, req, uuid, atype, callback, user_data)); } else |