| 214 | } |
| 215 | |
| 216 | void AsyncHandler::ClearRequests() { |
| 217 | auto it = async_requests.begin(); |
| 218 | while (it != async_requests.end()) { |
| 219 | if (it->second.IsReady()) { |
| 220 | it = async_requests.erase(it); |
| 221 | } else { |
| 222 | ++it; |
| 223 | } |
| 224 | } |
| 225 | async_requests.clear(); |
| 226 | } |
| 227 | |
| 228 | FileRequestAsync* AsyncHandler::RequestFile(std::string_view folder_name, std::string_view file_name) { |
| 229 | auto path = FileFinder::MakePath(folder_name, file_name); |