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

Function repair

include/process/future.hpp:1506–1517  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1504
1505template <typename T>
1506void repair(
1507 lambda::CallableOnce<Future<T>(const Future<T>&)>&& f,
1508 std::unique_ptr<Promise<T>> promise,
1509 const Future<T>& future)
1510{
1511 CHECK(!future.isPending());
1512 if (future.isFailed()) {
1513 promise->associate(std::move(f)(future));
1514 } else {
1515 promise->associate(future);
1516 }
1517}
1518
1519
1520template <typename T>

Callers

nothing calls this directly

Calls 3

isPendingMethod · 0.80
isFailedMethod · 0.80
associateMethod · 0.80

Tested by

no test coverage detected