MCPcopy Create free account
hub / github.com/3rdparty/libprocess / collect

Function collect

include/process/collect.hpp:274–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

272
273template <typename T>
274inline Future<std::vector<T>> collect(
275 const std::vector<Future<T>>& futures)
276{
277 if (futures.empty()) {
278 return std::vector<T>();
279 }
280
281 Promise<std::vector<T>>* promise = new Promise<std::vector<T>>();
282 Future<std::vector<T>> future = promise->future();
283 spawn(new internal::CollectProcess<T>(futures, promise), true);
284 return future;
285}
286
287
288template <typename... Ts>

Callers 3

synchronizedFunction · 0.85
TESTFunction · 0.85
TESTFunction · 0.85

Calls 6

bindFunction · 0.85
futureMethod · 0.80
spawnFunction · 0.70
emptyMethod · 0.45
thenMethod · 0.45
getMethod · 0.45

Tested by 2

TESTFunction · 0.68
TESTFunction · 0.68