diff options
| author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-09-02 09:22:46 +0300 | 
|---|---|---|
| committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-09-02 17:10:24 +0300 | 
| commit | 4ebba5b91845b7cccd3af697da3fd71fb0779ab5 (patch) | |
| tree | a16e41887a53e1d20ffec3ba0f107843dd05dc2b /indra/llmessage | |
| parent | 2fe897940149039d5f9079bcc4bf73b017e03720 (diff) | |
SL-13891 Coroutine creation was requested on exit
Diffstat (limited to 'indra/llmessage')
| -rw-r--r-- | indra/llmessage/llexperiencecache.cpp | 16 | ||||
| -rw-r--r-- | indra/llmessage/llexperiencecache.h | 2 | 
2 files changed, 9 insertions, 9 deletions
| diff --git a/indra/llmessage/llexperiencecache.cpp b/indra/llmessage/llexperiencecache.cpp index 7d96ac4b02..64c01bd9eb 100644 --- a/indra/llmessage/llexperiencecache.cpp +++ b/indra/llmessage/llexperiencecache.cpp @@ -85,15 +85,15 @@ const F64 LLExperienceCache::DEFAULT_EXPIRATION	= 600.0;  const S32 LLExperienceCache::DEFAULT_QUOTA			= 128; // this is megabytes  const int LLExperienceCache::SEARCH_PAGE_SIZE     = 30; +bool LLExperienceCache::sShutdown = false; +  //========================================================================= -LLExperienceCache::LLExperienceCache(): -    mShutdown(false) +LLExperienceCache::LLExperienceCache()  {  }  LLExperienceCache::~LLExperienceCache()  { -  }  void LLExperienceCache::initSingleton() @@ -122,7 +122,7 @@ void LLExperienceCache::cleanup()      {          cache_stream << (*this);      } -    mShutdown = true; +    sShutdown = true;  }  //------------------------------------------------------------------------- @@ -344,7 +344,7 @@ void LLExperienceCache::requestExperiences()      ostr << urlBase << "?page_size=" << PAGE_SIZE1;      RequestQueue_t  requests; -    while (!mRequestQueue.empty()) +    while (!mRequestQueue.empty() && !sShutdown)      {          RequestQueue_t::iterator it = mRequestQueue.begin();          LLUUID key = (*it); @@ -398,8 +398,6 @@ void LLExperienceCache::idleCoro()      LL_INFOS("ExperienceCache") << "Launching Experience cache idle coro." << LL_ENDL;      do       { -        llcoro::suspendUntilTimeout(SECS_BETWEEN_REQUESTS); -          if (mEraseExpiredTimer.checkExpirationAndReset(ERASE_EXPIRED_TIMEOUT))          {              eraseExpired(); @@ -410,7 +408,9 @@ void LLExperienceCache::idleCoro()              requestExperiences();          } -    } while (!mShutdown); +        llcoro::suspendUntilTimeout(SECS_BETWEEN_REQUESTS); + +    } while (!sShutdown);      // The coroutine system will likely be shut down by the time we get to this point      // (or at least no further cycling will occur on it since the user has decided to quit.) diff --git a/indra/llmessage/llexperiencecache.h b/indra/llmessage/llexperiencecache.h index f9ff69c2b6..1c97133723 100644 --- a/indra/llmessage/llexperiencecache.h +++ b/indra/llmessage/llexperiencecache.h @@ -142,7 +142,7 @@ private:      LLFrameTimer    mEraseExpiredTimer;    // Periodically clean out expired entries from the cache      CapabilityQuery_t mCapability;      std::string     mCacheFileName; -    bool            mShutdown; +    static bool     sShutdown; // control for coroutines, they exist out of LLExperienceCache's scope, so they need a static control      void idleCoro();  	void eraseExpired(); | 
