MCPcopy Create free account
hub / github.com/FlagBrew/PKSM / exitMulti

Method exitMulti

common/source/utils/fetch.cpp:230–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228}
229
230void Fetch::exitMulti()
231{
232 multiThreadInfo = false; // Stop multi thread
233 if (multiInitialized)
234 {
235 // multiThreadInfo.wait(false);
236 // And finally clean up
237 __lock_acquire(fetchesMutex);
238 __lock_acquire(multiHandleMutex);
239 for (const auto& i : fetches)
240 {
241 curl_multi_remove_handle(multiHandle, i.fetch->curl.get());
242 }
243 fetches.clear();
244 __lock_release(fetchesMutex);
245 __lock_close(fetchesMutex);
246 curl_multi_cleanup(multiHandle);
247 __lock_release(multiHandleMutex);
248 __lock_close(multiHandleMutex);
249 }
250}
251
252CURLMcode Fetch::performAsync(std::shared_ptr<Fetch> fetch,
253 std::function<void(CURLcode, std::shared_ptr<Fetch>)> onComplete,

Callers

nothing calls this directly

Calls 2

clearMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected