| 743 | } |
| 744 | |
| 745 | void TextureCache::waitForQuit() |
| 746 | { |
| 747 | // notify sub thread to quick |
| 748 | std::unique_lock<std::mutex> ul(_requestMutex); |
| 749 | _needQuit = true; |
| 750 | _sleepCondition.notify_one(); |
| 751 | ul.unlock(); |
| 752 | if (_loadingThread) |
| 753 | _loadingThread->join(); |
| 754 | |
| 755 | for (AsyncStruct* s : _asyncStructQueue) |
| 756 | delete s; |
| 757 | |
| 758 | _asyncStructQueue.clear(); |
| 759 | _requestQueue.clear(); |
| 760 | } |
| 761 | |
| 762 | std::string TextureCache::getCachedTextureInfo() const |
| 763 | { |
no test coverage detected