MCPcopy Create free account
hub / github.com/comaps/comaps / StartThreads

Method StartThreads

libs/platform/http_request.cpp:131–143  ·  view source on GitHub ↗

Starts a thread per each free/available server.

Source from the content-addressed store, hash-verified

129
130 // Starts a thread per each free/available server.
131 ChunksDownloadStrategy::ResultT StartThreads()
132 {
133 string url;
134 std::pair<int64_t, int64_t> range;
135 ChunksDownloadStrategy::ResultT result;
136 while ((result = m_strategy.NextChunk(url, range)) == ChunksDownloadStrategy::ENextChunk)
137 {
138 HttpThread * p = CreateNativeHttpThread(url, *this, range.first, range.second, m_progress.m_bytesTotal);
139 ASSERT(p, ());
140 m_threads.push_back(std::make_pair(p, range.first));
141 }
142 return result;
143 }
144
145 class ThreadByPos
146 {

Callers

nothing calls this directly

Calls 4

ASSERTFunction · 0.85
NextChunkMethod · 0.80
CreateNativeHttpThreadFunction · 0.70
push_backMethod · 0.45

Tested by

no test coverage detected