| 225 | } |
| 226 | |
| 227 | std::pair<const void*, size_t> Session::getCache() { |
| 228 | // Set cancelled for quickly ending |
| 229 | for (auto& iter : mRuntime.first) { |
| 230 | iter.second->mCancelled = true; |
| 231 | } |
| 232 | waitAsyncResize(); |
| 233 | |
| 234 | for (auto iter : mRuntime.first) { |
| 235 | auto res = iter.second->onGetCache(); |
| 236 | if (res.first != nullptr) { |
| 237 | return res; |
| 238 | } |
| 239 | } |
| 240 | return std::make_pair(nullptr, 0); |
| 241 | } |
| 242 | |
| 243 | ErrorCode Session::run() const { |
| 244 | if (mNeedResize) { |
no test coverage detected